ConvertEncoding to UTF8 does not set the string code page
LConvEncoding.ConvertEncoding(~, ~, 'UTF8', True)
and LConvEncoding.ConvertEncodingToUTF8
do not set a correct string code page for the result. The code page gets inherited from the input string. The end result is a corrupted string.
Broken in:
- Lazarus 2.3.0 rmain-2_3-321-g5ae19e4e FPC 3.2.0 i386-win32-win32/win64
- Lazarus 2.0.12 r64642 FPC 3.2.0 i386-win32-win32/win64
Works correctly in:
- Lazarus 2.0.4 r61665 FPC 3.0.4 i386-win32-win32/win64
Sample code will be attached in comments.