UTF8 Windows Vista console output fails on trunk, works in 2.6.1
Original Reporter info from Mantis: BigChimp
-
Reporter name: Reinier Olislagers
Original Reporter info from Mantis: BigChimp
- Reporter name: Reinier Olislagers
Description:
The attached console program correctly prints UTF8 characters on the console but prints garbled output on trunk.
Steps to reproduce:
On Windows (presumably Vista+), set console font to a Unicode-enabled font (instead of the default raster font).
Make sure the attached file is saved as UTF8 without BOM, compile and execute.
On FPC 2.6.1, the output will be something like:
UTF8 test: rosé, водка and ούζο
On trunk the output will be something like
UTF8 test: rosǸ, ������ѧ�� and ר�?��ר
(in any case, garbled)
Additional information:
Already asked on forum and mailing list without any response on why this code works with 2.6.1 and fails with trunk.
I realize this may be just my ignorance of the new way of working with Unicode strings, but I could not find any documentation on the changes (e.g. http://wiki.lazarus.freepascal.org/User_Changes_Trunk) so I'm reduced to trial and error.
IOW: this is either a problem with the compiler or more likely a documentation issue.
If official documentation remains to be written, I'd be happy to update
http://wiki.lazarus.freepascal.org/Console_Mode_Pascal
and/or
http://wiki.lazarus.freepascal.org/LCL_Unicode_Support
given some solid info.
Mantis conversion info:
- Mantis ID: 22461
- OS: Windows
- OS Build: Vista
- Build: 21937
- Platform: x64
- Version: 2.7.1
- Fixed in version: 3.0.0
- Fixed in revision: 995 (#6d5e874a)
- Monitored by: » takeda99 (Takeda Matsuki)
- Target version: 3.0.0