On 15 December 2012 18:35, Martin <[email protected]> wrote: > 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 http://wiki.freepascal.org/** > LCL_Unicode_Support <http://wiki.freepascal.org/LCL_Unicode_Support> > I didnt find the fpc specific page, if exists (I suspect it does) > > > I am calling a function "function Foo(A:string)" {$mode objfpc}{$H+} > I call it with a constant, that contains an german umlaut. Checked with a > hex editor, the constant in the source file is utf8 > > - If I save the source (in utf8), without a utf8 BOM, then it works fine > on windows. > - If I had a bom, then the string received by the function appears to be > ascii (checked memory dump in debugger "oe" becomes d6 > - if I add {$codepage utf8} it also becomes ascii > > 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. > If I add it things also go wrong, only different. Again no more info. > > ----------- > > I know the provided info, is very little. If there is anything obvious > then tell me. > > Thanks > ______________________________**_________________ > fpc-devel maillist - [email protected] > http://lists.freepascal.org/**mailman/listinfo/fpc-devel<http://lists.freepascal.org/mailman/listinfo/fpc-devel> >
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". 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. 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. 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. Just my thoughts. -- Frank Church ======================= http://devblog.brahmancreations.com
_______________________________________________ fpc-devel maillist - [email protected] http://lists.freepascal.org/mailman/listinfo/fpc-devel
