Differences From Artifact [5329f7273d]:
- File
src/OFStdIOStream_Win32Console.h
— part of check-in
[3e1b6bccbc]
at
2016-03-12 20:28:31
on branch trunk
— Properly handle UTF-8 in Win32 console
The previous way was to set the codepage to UTF-8, however, this does
not work properly on some versions of Windows.Instead, this catches reads / writes on of_std* on the lowlevel,
interprets it as UTF-8, converts it to / from UTF-16 and then uses
ReadConsoleW() / WriteConsoleW().Surrogates being cut in the middle is not properly handled yet, this
will be implemented in a follow up commit. (user: js, size: 769) [annotate] [blame] [check-ins using]
To Artifact [34f51c6008]:
- File
src/OFStdIOStream_Win32Console.h
— part of check-in
[566d4df603]
at
2016-03-13 10:24:22
on branch trunk
— OFStdIOStream_Win32Console: Improve reading
On reads, surrogates that have been cut off are now properly handled. (user: js, size: 804) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
19 20 21 22 23 24 25 26 27 28 29 | #import "OFStdIOStream.h" OF_ASSUME_NONNULL_BEGIN @interface OFStdIOStream_Win32Console: OFStdIOStream { HANDLE _handle; } @end OF_ASSUME_NONNULL_END | > | 19 20 21 22 23 24 25 26 27 28 29 30 | #import "OFStdIOStream.h" OF_ASSUME_NONNULL_BEGIN @interface OFStdIOStream_Win32Console: OFStdIOStream { HANDLE _handle; of_char16_t _incompleteSurrogate; } @end OF_ASSUME_NONNULL_END |