Re: [fpc-pascal] FPC 3.x for Windows and code page conversion

2015-11-23 Thread Michael Van Canneyt
On Mon, 23 Nov 2015, Lubos Pintes wrote: Hello, Thanks for replies, I will try to explain this in other way: My system code page is windows-1250. When a string is sent to a COM component, it is somehow converted to UTF-16. Thus FPC knows how to do the conversion. Now I know that I am receivi

Re: [fpc-pascal] FPC 3.x for Windows and code page conversion

2015-11-23 Thread Lubos Pintes
Hello, Thanks for replies, I will try to explain this in other way: My system code page is windows-1250. When a string is sent to a COM component, it is somehow converted to UTF-16. Thus FPC knows how to do the conversion. Now I know that I am receiving text in UTF-8. Thus I called UTF8ToANSI t

Re: [fpc-pascal] FPC 3.x for Windows and code page conversion

2015-11-23 Thread Jonas Maebe
Lubos Pintes wrote on Mon, 23 Nov 2015: 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

Re: [fpc-pascal] FPC 3.x for Windows and code page conversion

2015-11-23 Thread Mattias Gaertner
On Mon, 23 Nov 2015 16:43:18 +0100 Lubos Pintes 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-pascal] FPC 3.x for Windows and code page conversion

2015-11-23 Thread Lubos Pintes
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.