TRegistry's rdMultiString treats Unicode strings as AnsiStrings
Original Reporter info from Mantis: CCRDude @ccrdude
-
Reporter name:
Original Reporter info from Mantis: CCRDude @ccrdude
- Reporter name:
Description:
TRegistry from unit Registry.pas in package fcl-registry supports rdMultiString through methods ReadStringList and WriteStringList - but treats the Unicode data from the WinAPI as ansistrings.
Additional information:
ReadStringList/WriteStringList
* use the underlying GetData/PutData,
* which in turn use SysGetData/SysPutData,
* which use RegQueryValueExW and RegSetValueExW.
These get assigned to a "String". Just like the correct implementation in ReadString/WriteString, this needs to use a UnicodeString and proper conversion using UTF8Encode/UTF8Decode before assigning from/to the TStrings parameter.
The required changes are drafted in the attached patch (untested yet).
Mantis conversion info:
- Mantis ID: 34876
- OS: Windows
- OS Build: 10 (1709)
- Platform: Intel PC
- Version: 3.3.1
- Monitored by: » @ccrdude (CCRDude)