[fpc-pascal]How to display special characters

Rich Pasco pasco at acm.org
Tue Mar 19 19:17:33 CET 2002


Codepages 437 and 850 are the DOS characters used in a command-shell
window.  Codepage ISO-8859-1 is the Windows character set used in
Windows GUI applications.  You can get into trouble if you use a
Windows GUI editor for source code for applications that will run
in a command-shell window, or vice versa.

For example, e-acute is #$82 in codepages 437 and 850, but #$E9 in
codepage ISO-8859-1.  If you wanted to write the Spanish word "olé"
in a command-shell application, you would write "ol"+#$82, but for
a windows-GUI application you would write "ol"+#$E9.

For another example, a-umlaut is #$84 in codepages 437 and 850, but
#$E4 in codepage ISO-8859-1.  If you wanted to write the German word
"spät" in a command-shell application, you would write "sp"+#$84+"t",
but for a windows-GUI application you would write "sp"+#$E4+"t".

I hope this helps.

     - Rich


Juha Nevalainen wrote:

> Sorry to bother you with trivial newbie question
> but the links to the archives seem broken right now.
> 
> How can I display special characters outside the standard
> A-Z range in the WIN32 environment?
> 
> I am using
> 
>     writeln('some strange chars like ä, ö etc');
> 
> but it displays other characters instead. Those above are ascii
> codes 132 and 148 in case you wondered or they dont dislay correctly.
> 
> I have codepage 850 active.  Any suggestions?




More information about the fpc-pascal mailing list