Hi,<div><br></div><div>According to what I have read (and I always wonder how up to date documentation is with respect to the state of the compiler and libraries), all standard library functions (Which would include system.assign) are still using the "local" encoding. For Mac OS X, luckily, this means UTF8. </div>
<div><br></div><div>Thus, the only question would be whether you have to manually convert a UnicodeString to a UTF8String or not. </div><div><br></div><div>If you don't trust it, you can build an overload version of assign to convert the string and call the old one, but note that in Windows the local encoding will be different than UTF8 in many cases (hence the wide version of the calls will be better), and in Linux it may be UTF-8 or something else) - so you can't always convert UTF16 to UTF8, call the old functions, and expect it to work on all OSs.<br>
<br></div><div>Still, fixing Assign/Reset/Rewrite would be better than using Unix calls, because you could submit a patch to save everyone else trouble in the future.</div><div><br></div><div>This kind of stuff is a real pain all the time, and not even that hard to fix, I am not sure why the "issues" remain - but perhaps there aren't enough volunteers with enough time to work on it.</div>
<div><br></div><div>I have done a lot of Unicode work, so if you have other problems let me know, I may already have written code to handle whatever the issue is, and would be happy to share it.</div><div><br></div><div>Thank you,</div>
<div> Noah Silva</div><div><br><div class="gmail_quote">2012/5/10 Jürgen Hestermann <span dir="ltr"><<a href="mailto:juergen.hestermann@gmx.de" target="_blank">juergen.hestermann@gmx.de</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Is it (already) possible to use Unicodestrings for file paths?<br>
I was able to access long paths (with many hundreds of characters)<br>
in the windows API functions FindFirstFileW (with Win32_Find_DataW<br>
data type) but I failed to open such files with Assign(File)/reset.<br>
Are they converted to (one byte) Ansistring internally?<br>
Am I forced to use CreateFile or similar function to open such files?<br>
<br>
______________________________<u></u>_________________<br>
fpc-pascal maillist - <a href="mailto:fpc-pascal@lists.freepascal.org" target="_blank">fpc-pascal@lists.freepascal.<u></u>org</a><br>
<a href="http://lists.freepascal.org/mailman/listinfo/fpc-pascal" target="_blank">http://lists.freepascal.org/<u></u>mailman/listinfo/fpc-pascal</a><br>
</blockquote></div><br></div>