[fpc-pascal] Console Encoding in Windows (Local VS. UTF8)

Noah Silva shiruba at galapagossoftware.com
Sun Jul 14 02:34:33 CEST 2013


Hi,

Some comments...

2013/7/9 Marco van de Voort <marcov at stack.nl>

> In our previous episode, Tomas Hajny said:
> > There is code page 65001 for UTF-8, however I don't know since which
> > version of MS Windows it is supported (and to which extent - e.g.
> > including the console output).
>
> Afaik Windows XP, but there might be font problems on console.
>
> I have been testing with Windows 7.


> > console using the Windows API call SetConsoleOutputCP, but e.g. our unit
> > Crt currently resets the code page used for output to console to the
> > "main" process code page (as returned by GetACP) on each write and thus
> > ignores the user selection - this will probably change in trunk in the
> > future as part of the Unicode support activities, but the current state
> is
> > like this.
>
> Keep in mind he is talking powershell, not cmd.exe
>

I have tried in both.  I tend to use PowerShell more often because I have
this habit that goes like this:

cmd.exe
>cd SourceCode
>ls
>Err: Command Not Found
(Swear words)
>dir

Using powershell saves me a little sanity since I am used to Unix Systems
and I can't install Cygwin everywhere.

At any rate, I assume that since the console is a separate thing from the
program running in it that powershell and cmd would be the same from the
point of view of a program executed from them.  Does powershell use a
different console?

 Thank you,
     Noah Silva

> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130714/846b3ec6/attachment.html>


More information about the fpc-pascal mailing list