No it is possible. IIRC you either need to install the new terminal app, orjj2007 wrote: Of course, the console is another story; it works fine for Russian with the Lucida Console or Consolas fonts on my Italian OS, but to display Chinese in the console, you need some acrobatics - unless you have a Chinese Windows version, I suppose.
set your app and terminal encoding to utf8, select a right font, and start your terminal with CMD /w
excuse my Freepascal/Delphi, but the code to do that looks like this:
Code: Select all
Const
LF_FACESIZE = 32;
Type
CONSOLE_FONT_INFOEX = record
cbSize : ULONG;
nFont : DWORD;
dwFontSize : COORD;
FontFamily : UINT;
FontWeight : UINT;
FaceName : array [0..LF_FACESIZE-1] of WCHAR;
end;
{ Only supported in Vista and onwards!}
function SetCurrentConsoleFontEx(hConsoleOutput: HANDLE; bMaximumWindow: BOOL; var CONSOLE_FONT_INFOEX): BOOL; stdcall; external kernel32;
var
New_CONSOLE_FONT_INFOEX: CONSOLE_FONT_INFOEX;
initialization
// these two switch the FPC to UTF8 as 1-byte encoding.
SetMultiByteConversionCodePage(CP_UTF8); // for general strings
SetMultiByteRTLFileSystemCodePage(CP_UTF8); // for filenames.
SetConsoleOutputCP(DefaultSystemCodePage); // winapi console. DefaultSystemCodepage is now utf8.
SetTextCodePage(Output, DefaultSystemCodePage); // adapt the FPC stdout descriptor.
FillChar(New_CONSOLE_FONT_INFOEX, SizeOf(CONSOLE_FONT_INFOEX), 0); // zero structure
New_CONSOLE_FONT_INFOEX.cbSize := SizeOf(CONSOLE_FONT_INFOEX);
New_CONSOLE_FONT_INFOEX.FaceName := 'Consolas';
// New_CONSOLE_FONT_INFOEX.FaceName := 'Lucida Console'; //use Lucida Console for Win XP, XP is no longer supported.
New_CONSOLE_FONT_INFOEX.FontWeight := 400;
New_CONSOLE_FONT_INFOEX.dwFontSize.Y := 16;
SetCurrentConsoleFontEx(StdOutputHandle, False, New_CONSOLE_FONT_INFOEX);
end.
p.s. I think your masm32 framework somehow shields you. Win32 exe are not utf8 by default, you have to do stuff for it, so probably done by the bloated masm32 framework. (:-)