<br><br><div class="gmail_quote">On 15 December 2012 18:35, Martin <span dir="ltr"><<a href="mailto:lazarus@mfriebe.de" target="_blank">lazarus@mfriebe.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I am trying to figure out how to do that, or what I do wrong. I found a page about $codepage, but it did not help <a href="http://wiki.freepascal.org/LCL_Unicode_Support" target="_blank">http://wiki.freepascal.org/<u></u>LCL_Unicode_Support</a><br>
I didnt find the fpc specific page, if exists (I suspect it does)<br>
<br>
<br>
I am calling a function "function Foo(A:string)" {$mode objfpc}{$H+}<br>
I call it with a constant, that contains an german umlaut. Checked with a hex editor, the constant in the source file is utf8<br>
<br>
- If I save the source (in utf8), without a utf8 BOM, then it works fine on windows.<br>
- If I had a bom, then the string received by the function appears to be ascii (checked memory dump in debugger "oe" becomes d6<br>
- if I add {$codepage utf8} it also becomes ascii<br>
<br>
If I do *not* add that, it seems something gos wrong with the encoding on a PowerPC Mac. Unfortunately this is someone else's pc, and I have no more info.<br>
If I add it things also go wrong, only different. Again no more info.<br>
<br>
-----------<br>
<br>
I know the provided info, is very little. If there is anything obvious then tell me.<br>
<br>
Thanks<br>
______________________________<u></u>_________________<br>
fpc-devel maillist - <a href="mailto:fpc-devel@lists.freepascal.org" target="_blank">fpc-devel@lists.freepascal.org</a><br>
<a href="http://lists.freepascal.org/mailman/listinfo/fpc-devel" target="_blank">http://lists.freepascal.org/<u></u>mailman/listinfo/fpc-devel</a><br>
</blockquote></div><br><br clear="all">As a digression from the main topic of this thread (and cringing in advance) I have to say that the FPC community should remember the saying "A picture is worth a thousand words".<br>
<br>It is obvious that Unicode is not a simple topic and among FPC/Lazarus developers/contributors,I suspect that few if any at all, have a detailed grasp of how it all hangs together in the current state of implementation. It brings to mind the parable of the 12 blind men and the elephant.<br>
<br>I think a diagram or graph of Unicode rules and their current state of implementation in FPC/Lazarus would go a long way to helping both developers and end users in this area. It is a topic which comes up regularly and it doesn't show signs of ever going to be properly resolved.<br>
<br>Sometimes I get the feeling there are areas where the developers should stop coding altogether, completely, and instead document the state of affairs as well as they can, and when that is done and no one is interested, take a long sabbatical and decide what to do when they return.<br>
<br>Just my thoughts.<br>-- <br>Frank Church<br><br>=======================<br><a href="http://devblog.brahmancreations.com">http://devblog.brahmancreations.com</a>