Hello Tomas, Friday, February 19, 2010, 11:55:39 PM, you wrote:
TH> No, this can't work that way, otherwise output of any accented TH> character in one of the Windows codepages would result in the same TH> error. Tested the "wrong" return of stdout: code page UTF8 - 65001 en Windows Length of string: 7 camión -> Returned written: 6 Source code: ------------------------------------- uses classes,windows; var s: ansistring; OutputStream: TStream; Begin Writeln('code page UTF8 - 65001 en Windows'); OutputStream := THandleStream.Create(GetStdHandle(STD_OUTPUT_HANDLE)); s:='cami'+#$C3+#$B3+'n'; //camión writeln('Length of string: ',Length(s)); writeln(' -> Returned written: ',OutputStream.write(s[1],Length(s))); OutputStream.free; End. -- Best regards, JoshyFun _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal