First of all,the characters you want to display is NOT ASCII.
Second: the codepage the console uses is not the default system codepage, but OEM codepage.
This uit might be of help:
unit setdefaultcodepages;
interface
uses
Windows;
implementation
Const
LF_FACESIZE = 32;
Type
CONSOLE_FONT_INFOEX = record
cbSize : ULONG;
nFont : DWORD;
dwFontSizeX : SHORT;
dwFontSizeY : SHORT;
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.dll' name 'SetCurrentConsoleFontEx';
var
New_CONSOLE_FONT_INFOEX : CONSOLE_FONT_INFOEX;
initialization
//writeln('SetDefaultCodepages unit initialization: DefaultSystemCodePage = ',DefaultSystemCodePage);
{$ifdef DisableUTF8RTL}
SetConsoleOutputCP(DefaultSystemCodePage);
SetTextCodepage(Output, DefaultSystemCodePage);
{$else}
SetConsoleOutputCP(cp_utf8);
SetTextCodepage(Output, cp_utf8);
{$endif}
FillChar(New_CONSOLE_FONT_INFOEX, SizeOf(CONSOLE_FONT_INFOEX), 0);
New_CONSOLE_FONT_INFOEX.cbSize := SizeOf(CONSOLE_FONT_INFOEX);
// New_CONSOLE_FONT_INFOEX.FaceName := 'Lucida Console';
New_CONSOLE_FONT_INFOEX.FaceName := 'Consolas';
New_CONSOLE_FONT_INFOEX.dwFontSizeX := 8;
New_CONSOLE_FONT_INFOEX.dwFontSizeY := 16;
SetCurrentConsoleFontEx(StdOutputHandle, False, New_CONSOLE_FONT_INFOEX);
end.
Now the console will understand UTF8 (which is what you are writing).
You need to add a dependency on LazUtils to your project.
(Use: Menu->Project->Project inspector)
Bart