[fpc-devel] TRegistry and Unicode

Bart bartjunk64 at gmail.com
Wed Mar 13 18:43:29 CET 2019


On Mon, Mar 11, 2019 at 4:03 PM Michael Van Canneyt
<michael at freepascal.org> wrote:

> From my perspective: the public API is all that matters.
> There I would opt for overloads that accept unicodestring.

Done that.
That was the easy part.

Now:
procedure GetKeyNames(Strings: TStrings);
procedure GetValueNames(Strings: TStrings);
procedure ReadStringList(const Name: String; AList: TStrings);

AFAIK we do not have a TUnicodeStrings(List).
Currently GetKeyNames and GetValueNames explicitely Utf8Encode the
unicode (Utf16) result for that methods.
Do I leave it like that?

For ReadStringList an optional parameter (like: ForceUTF8:
Boolean=False) can be added to control this behaviour.
Delphi AFAIK does not have such a method, so Delphi compatibility is
not an issue here.

Opninions?

Todo's for me:
- the above
- Make TXMLRegistry use UnicodeString
- Things I forgot about
- TRegIniFile: IMO don't change the API

-- 
Bart



More information about the fpc-devel mailing list