This has been discussed before. Automatic conversion to/from ansistrings will always be to/from system encoding. If you want another encoding than the system encoding you will have to do a manual conversion.

Actually you as the application developer can control how conversions between ansistrings and widestrings are handled by using getwidestringmanager/setwidestringmanager .

So for example you could use a byte value of $7F at the beggining of an ansistring as a marker that the string was in UTF-8 and implement a Ansi2WideMoveProc that checked for it and either interpreted it as UTF-8 if it saw the marker and passed it off to the old Ansi2WideMoveProc if not.

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

Reply via email to