Florian Klaempfl het geskryf:
> 
> Do you use the cwstrings unit? Did you tell the encoding (UTF-8?) to the
> compiler? Did you use the UnicodeChar instead of Char?


Yes to all, and the example still doesn't work.

------------------------
$ ./test3
ä
------------------------

ä  is not 世 as the website described the result to be.

----------------------------
program test3;

{$mode objfpc}{$H+}
uses
  cwstring, Classes, SysUtils;

var
  MyChar: UnicodeChar;
  MyString: UnicodeString;
begin
  MyString := '世界您好';
  MyChar := MyString[1];
  writeln(MyChar);
end.
-----------------------------


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to