<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Am 18.12.2012 14:47, schrieb Anton
Kavalenka:<br>
</div>
<blockquote cite="mid:50D073FA.8040607@tut.by" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
On 15.12.2012 21:35, Martin wrote:
<blockquote cite="mid:50CCC30E.2020205@mfriebe.de" type="cite">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
moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://wiki.freepascal.org/LCL_Unicode_Support">http://wiki.freepascal.org/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>
_______________________________________________ <br>
fpc-devel maillist - <a moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a>
<br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://lists.freepascal.org/mailman/listinfo/fpc-devel">http://lists.freepascal.org/mailman/listinfo/fpc-devel</a>
<br>
</blockquote>
<font face="Liberation Sans"><br>
Probably this is due to significant change in FPC 2.7 RTL<br>
<br>
<b>String</b> type implies the encoding inside<br>
under WIndows it is ANSI by default.<br>
</font><br>
</blockquote>
<font face="Liberation Sans">Martin's question is related to 2.6.0
(see his mail's subject) not 2.7.1.<br>
<br>
Regards,<br>
Sven<br>
</font>
</body>
</html>