txmlregistry incorrect utf-8 string handling
Original Reporter info from Mantis: xrfang
-
Reporter name: Shannon
Original Reporter info from Mantis: xrfang
- Reporter name: Shannon
Description:
To reproduce the problem:
- compile and run attached program under Linux
- Click the "Write" button and choose the included "test.txt" file.
- Click the "Read" button, the program will crash.
Note: the test.txt file contains two lines, the program only read the first
line, if that line contains CJK, it will crash.
Mattias Gaertner:
Bug is in TXmlRegistry.
TXmlRegistry.GetValueData computes in bytes, while
TXMLRegistry.GetValueInfo returns length of widestring.
So, you can only use ascii characters in string values.
Mantis conversion info:
- Mantis ID: 24868
- OS: linux
- OS Build: Ubuntu 13.04
- Platform: amd64
- Version: 2.6.2
- Fixed in version: 2.6.4
- Fixed in revision: 21299 (#22d1077c)
- Monitored by: » Vincent (Vincent Snijders)
- Target version: 2.6.4