Hi, 2013/7/9 Jonas Maebe <[email protected]>
> > The console code page. You can get it using the following function: > function GetConsoleOutputCP : UINT; stdcall; external 'kernel32' name > 'GetConsoleOutputCP'; > > 2. Is there any reason why writing out data in the local encoding (with >> write statements, etc.) should get corrupted? For example is some level >> of >> the RTL assuming something about the encoding? (I don't think so, but...) >> > > Not in 2.6.x. In 2.7.x, every ansistring is tagged with a code page (the > ansi code page by default) and the RTL will convert it to the console code > page before writing it. > > > Oddly enough, I can get my (2.6.1) version to change the garbage it shows but but saving the file as UTF8 with BOM. (Until now, I had been using UTF8 w/o BOM). http://wiki.freepascal.org/LCL_Unicode_Support/ja And the garbage it shows is the same garbage I see if I convert from UTF8 to ANSI manually using UTF8toAnsi or UTF8ToSys. Detecting the Unicode BOM or not seems to be a strange way to switch the behavior of the compiler, I wonder why a $define wasn't used instead. (Looking at the difference in handling, the BOM way seems much more convenient, so I will convert things over to that...) Jonas > Thank you, Noah Silva > ______________________________**_________________ > fpc-pascal maillist - > [email protected].**org<[email protected]> > http://lists.freepascal.org/**mailman/listinfo/fpc-pascal<http://lists.freepascal.org/mailman/listinfo/fpc-pascal> >
_______________________________________________ fpc-pascal maillist - [email protected] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
