[fpc-devel] TRegistry and Unicode

Michael Van Canneyt michael at freepascal.org
Wed Mar 6 20:39:08 CET 2019



On Wed, 6 Mar 2019, Bart wrote:

> On Wed, Mar 6, 2019 at 6:28 PM Michael Van Canneyt
> <michael at freepascal.org> wrote:
>
>> Ideally, they should all be fixed. They are all potential sources of error.
>
> You can't have it both ways: use CP_ACP string and expect them to be
> able to handle Unicode outside of their codepage, unless your codepage
> is UTF8.

Not sure I follow you ?

If somewhere there is a warning about conversion of unicodestring to
ansistring (often abused as single-byte string) then this must be looked at and somehow
fixed.

This can mean changing the single-byte string type to UTF8String and doing a UTF8Decode/Encode.
Needs to be checked on a case-by case basis.

Michael.



More information about the fpc-devel mailing list