On Mon, 23 Nov 2015 16:43:18 +0100
Lubos Pintes <lubos.pin...@gmail.com> wrote:

> Hello,
> I am developing a console application which receives an UTF-8 encoded 
> text through stdin.
> The text is, after possible modification, sent to SAPI5. The SAPI5 
> generated interface wrappers have parameters of type string.
> In FPC 2.6.4, I used UTF8toANSI on various places and that worked well. 
> Now after reading about FPC 3.x's unicode support, I thought that adding 
> this line say after begin in the main program could be enough:
> SetMultiByteConversionCodePage(CP_UTF8);

The above setting makes UTF8ToAnsi to convert the string to UTF-16 and
back to UTF-8.

> It however doesn't work.
> How can I solve this without conversion to ANSI?

Do you want to convert an UTF8 string to the system codepage?
Are you using any Lazarus units?

Mattias
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to