PROGRAM TRYCHAR;
{$mode objfpc}{$H+}
{$APPTYPE CONSOLE}
USES {$IFDEF WINDOWS}
Windows, {for setconsoleoutputcp}
{$ENDIF} DOS
, UnicodeCRT;
CONST scne='┐';//#191; { use Unicode instead of ANSI }
scnw='┌';//#218;
scsw='└';//#192;
scse='┘';//#217;
slho='─';//#196;
slve='│';//#179;
VAR f1,f2:TEXT;
BEGIN
{$IFDEF WINDOWS}
SetConsoleOutputCP(CP_UTF8);
{$ENDIF}
SetMultiByteConversionCodePage(CP_UTF8);
TextRec(Output).CodePage := CP_UTF8;
writeln('DefaultSystemCodePage = ', DefaultSystemCodePage);
Writeln('ConsoleCodePage = ', TextRec(Output).CodePage);
writeln(scnw,slho,scne);
writeln(slve,' ',slve);
writeln(scsw,slho,scse);
Assign(f2,'OUTPUT.DAT');
Rewrite(f2);
writeln(f2,scnw,slho,scne);
writeln(f2,slve,' ',slve);
writeln(f2,scsw,slho,scse);
Close(f2);
END.