开发者

Delphi: Unicode->AnsiString, language for non-unicode programs

开发者 https://www.devze.com 2023-03-12 02:59 出处:网络
I have Delphi 2010. XXX-component uses File_Path:AnsiString. A path can be written in XXX-language. If I set to use XXX-language for non-unicode programs in Windows settings then XXX-component recogn

I have Delphi 2010.

XXX-component uses File_Path:AnsiString. A path can be written in XXX-language. If I set to use XXX-language for non-unicode programs in Windows settings then XXX-component recognize the path but if I set default Windows settings 开发者_高级运维(English Windows-English for non-unicode programs) XXX-component can not recognize the path.

How to fix it?

Thank you!!!


To solve this problem you need to move away from ANSI strings and start using Unicode strings and the corresponding Unicode versions of the Windows API. At the moment you are reliant on the computer locale and that's an enormous world of pain.

Moving from AnsiString to string takes a little effort but the benefits make the effort well worthwhile.

Embrace Unicode and forget all about the bad old days!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号