Quoteif @CreateFile = @CreateFileA then
WriteLn('Ansi API')
else
WriteLn('Unicode API');
As the person that created FPC_OS_UNICODE, I still find it hard to understand the actual problem.
Whatever "createfile" is aliased too doesn't really matter much. Changing it to _W won't make everything automatically wide tolerant.3
So maybe take a step back and describe what is actually the problem.
What is the correct way to use {$mode delphiunicode} to be compatible with Delphi source?It is not possible yet. The most Delphi compatible solution now is the UTF-8 solution provided by Lazarus:
Yes, it is very compatible at source level despite the different encodings. Check it out.And the encodings are really painful to this project :D So I'm looking for other ways.
And the encodings are really painful to this project :D So I'm looking for other ways.Give me an example please. I believe you have some kind of prejudice now.
Is rebuilding fpc (https://forum.lazarus.freepascal.org/index.php?topic=31065.0) with unicode defines still not worth trying?No.
I believe you have some kind of prejudice now.Perhapse I was doing something wrong last time. Should give it a try once more.
- convert all units to UTF8Source files must be UTF-8, yes.
- use {$mode delphi}
- remove {$H+}
- add -FcUTF8
Is this scenario Ok?
Не указано имя для создания пары ключейUnit in UTF8BOM works fine.
Then this "compatibility" makes very little sense :(Could you tell please why you want to use the historical ANSI system codepages instead of Unicode?
Could you tell please why you want to use the historical ANSI system codepages instead of Unicode?If I understood him correctly the API calls are not linked directly to their _W equivalent. When you write CreateProcess is "mapped" to CreateProcessA not CreateProcessW.
Unicode has existed for decades and solves all problems inherent to the codepages.
If I understood him correctly the API calls are not linked directly to their _W equivalent. When you write CreateProcess is "mapped" to CreateProcessA not CreateProcessW.True, in FPC 3.0.2 sources CreateProcess maps to CreateProcessA. In future the defaults must be changed to use the _W API versions. It is important for Unicode support, regardless of encoding.