[fpc-devel] FPC 2.3.1 seems a mixed mess with Unicode support

Florian Klaempfl florian at freepascal.org
Tue Sep 15 13:46:20 CEST 2009


Graeme Geldenhuys schrieb:
> Florian Klaempfl het geskryf:
>> Then you shouldn't cry if a release candidate breaks your stuff :)
> 
> I'm not crying. I go through this process on every new FPC release. It's
> part of my job. :-)
> 
> 
>> We can only fix stuff we know about.
> 
> And I only know about things (issues) when I get our code ready for a
> new release. ;-)
> 
> As I said, before I used to stay compatible with "unstable" FPC
> releases, but that was just way to much work. Code constantly broke
> etc... Now I do this just before a new release, when the "FPC release
> candidate" is a lot more stable.
> 
> 
>> Fill bug reports if you need and use it.
> 
> I'll start filing them - as long as Vincent doesn't get on my case
> again. ;-)
> 
> 
>>> -----------------------------
>>> program test2;
>>>
>>> {$mode objfpc}{$H+}
>>> uses
>>>   Classes, SysUtils;
>>>
>>> var
>>>   MyChar: Char;
>>>   MyString: UnicodeString;
>>> begin
>>>   MyString := '世界您好';
>>>   MyChar := MyString[1];
>>>   writeln(MyChar);
>>> end.
>>> -----------------------------
>> BTW: This is UCS coding style as well ;)
> 
> Even worse then! FPC is not Unicode or UCS-2 compatible.

Do you use the cwstrings unit? Did you tell the encoding (UTF-8?) to the
compiler? Did you use the UnicodeChar instead of Char?



More information about the fpc-devel mailing list