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

Noah Silva shiruba at galapagossoftware.com
Sun Jul 14 16:41:12 CEST 2013


Hi,


2013/7/10 Graeme Geldenhuys <graeme at geldenhuys.co.uk>

> On 2013-07-09 13:08, Tomas Hajny wrote:
> >> Afaik Windows XP, but there might be font problems on console.
> > I also thought about mentioning True Type fonts (like Lucida) being a
>

The font is not the issue here...

If you see text that looks like lots of empty squares (looks like ❏❏❏❏),
then you probably have a situation where the system is properly decoding
your text, but the current font doesn't have glyphs for it.  That's no big
deal, you just change your font.

If the system thinks your text is in one encoding, but it's really in
another encoding, etc., then you will have "mojibake", which basically
means that your original text isn't restored properly even in memory, and
you will see lots of semi-random characters.


> It's not so much about True Type fonts, but about enabling a Unicode
> font in the console.


This is also not a problem.  Most of the fonts use Unicode, so even if you
"type" a SJIS file on the console, the system is internally converting it
to Unicode and displaying it anyway on newer versions of Windows.


> There are many True Type fonts that only support
> the ASCII character-set.
>
> Yes, but the system normally will automatically switch to one that can,
and f.e. the default fonts in Japanese versions of Windows can.

>
> Regards,
>   G.
>
>
>
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/0e682bdf/attachment.html>


More information about the fpc-pascal mailing list