[fpc-devel] TRegistry fixes

Pierre Muller pierre at freepascal.org
Tue Feb 12 08:24:57 CET 2019


  Hi Bart,

Le 11/02/2019 à 15:29, Bart a écrit :
> Hi,
> 
> The new (W-API based) TRegistry in trunk and 3.2 fixes has some
> problems on Windows, amongst which at least one regression.
> 
> https://bugs.freepascal.org/view.php?id=35060
> The use of Utf8Decode on strings that are not guaranteed to be CP_UTF8 is wrong.
> As a result Keys with unicode characters in their name cannot be read
> anymore (nor written to).
> (This is a regression)
> 
> https://bugs.freepascal.org/view.php?id=34876
> The implementation of ReadStringList/WriteStringList treats a sequence
> of Unicode chars (WideChar) as if they were AnsiChar (a.o.).
> 
> https://bugs.freepascal.org/view.php?id=35022
> TRegIniFile writes data to the wrong Key.
> 
> All these issues have patches and sample programs attached.
> 
> The patch for https://bugs.freepascal.org/view.php?id=35022 also
> resolves https://bugs.freepascal.org/view.php?id=35023 and
> https://bugs.freepascal.org/view.php?id=33980
> 
> Attached to https://bugs.freepascal.org/view.php?id=35022  is also a
> test, intended to be added to tests/test/packages/fcl-registry.
> (Currently the only test there is a trivial one.)
> 
> I can try to write tests for the other issues as well, but verifying
> in code that WriteStringList yields the correct result may be a little
> tricky, because it would depend on ReadStringList.
> The patch for that issue will write a StringList and read that back
> again and regedit does not complain that data is wrong.
> 
> It would be very nice if some devel who actually uses Windows (and has
> at least rudimentary knowledge of the use of TRegistry) can have a
> look at it and give some feedback.
> Especially since these bugs will be in the upcoming 3.2.0 if they are
> not fixed (and merged).
> 


  I am one of the rare regular users of Windows OS in the core team,
but I must also confess that I am neither knowledgeable in TRegistry fields,
nor in all what concerns UniCode matters, which is still the main point
of those modifications...

  If nobody else steps up, I will try to look into it,
but I hope someone else from core team will be able to check and commit
those changes...


Pierre



More information about the fpc-devel mailing list