<div dir="ltr"><div>I'm hoping somebody could point me to the specific change (mantis bug #, revision #, user changes wiki page link, whatever) between 2.6.4 and 3.0.0 that fixes this problem I was running into.</div><div><br></div><div>Given this sample program:</div><div><br></div><div>=======================================<br></div><div><div>program Project1;</div><div><br></div><div>{$mode objfpc}{$H+}</div><div><br></div><div>uses</div><div> cthreads,</div><div> cwstring,</div><div> Classes,</div><div> SysUtils,</div><div> XMLWrite,</div><div> dom;</div><div><br></div><div>var</div><div> s : ansistring;</div><div> s2 : ansistring;</div><div> dstDoc : TXMLDocument;</div><div> rootNode : TDomNode;</div><div> childNode : TDomNode;</div><div>begin</div><div> s := #$E3#$82#$A6#$E3#$82#$A3#$E3#$83#$AB#$E3#$82#$B9;</div><div> writeln('[', s, ']');</div><div> dstDoc := TXMLDocument.Create;</div><div> try</div><div> rootNode := dstDoc.CreateElement('root');</div><div> childNode := dstDoc.CreateElement('contents');</div><div> TDOMElement(childNode).SetAttribute('value', widestring(s));</div><div> s2 := ansistring(TDOMElement(childNode).GetAttribute('value'));</div><div> rootNode.AppendChild(childNode);</div><div> dstDoc.AppendChild(rootNode);</div><div> finally</div><div> WriteXMLFile(dstDoc, 'export.xml');</div><div> FreeAndNil(dstDoc);</div><div> end;</div><div> writeln('[', s2, ']');</div><div>end.</div></div><div>=======================================<br></div><div><br></div><div>With FPC 2.6.4 I end up with "????????????" for the output (both to the console and written to the xml file) as the output. With FPC 3.0 I get the correct representation of the japanese characters.</div><div><br></div><div>So my question is:</div><div><br></div><div>1. What changed between FPC 2.6.4 and 3.0 to cause the change in behavior?</div><div><br></div><div>and </div><div><br></div><div>2. (apart from upgrading to FPC 3.0) Is there any workaround in 2.6.4 to get the correct behavior?</div><div><br></div><div>I'd prefer just to be using 3.0 everywhere but on some legacy versions of our product upgrading the build environment is not an option right now.</div><div><br></div><div>Thanks much,</div><div><br></div><div>-SG</div><div><br></div><div><br></div><div><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr">--<br>Seth Grover<br><br>
Be kind to all of your neighbors<br>
Because they're just like you.<br>
And you're nothing special<br>
Unless they are too.<br></div></div></div></div></div>
</div></div>