International Characters in Console mode programs...

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

International Characters in Console mode programs...

"S.Anıl Yılmaz"
Hi,

I cannot manage to print any Turkish characters in console. (Code Page
ISO-8859-9), I use Windows XP Turkish, I can type and display Turkish
characters, but if my FP program's output displays these kind of text,
only spaces or "?" appear instead of intended characters. I use
widestrings to represent these chars. There is something I don't do
right I am sure, but what is it? Thanks in advance.
Anil

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: International Characters in Console mode programs...

Marco van de Voort
> I cannot manage to print any Turkish characters in console. (Code Page
> ISO-8859-9), I use Windows XP Turkish, I can type and display Turkish
> characters, but if my FP program's output displays these kind of text,
> only spaces or "?" appear instead of intended characters. I use
> widestrings to represent these chars. There is something I don't do
> right I am sure, but what is it? Thanks in advance.

This is one of the issues that 2.0.4 should at least improve upon. See the
2.0.4 versions on the FTP site.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: International Characters in Console mode programs...

Rimgaudas Laucius
Hello,

i cast a look at 2.0.4 source - it does not solves this kind of problems. I
guess you prepared program using FP IDE. It uses OEM CP (CP857 for Turkish)
for source encoding. Compiler misencodes these strings because i guess it
uses RTL widestring manager whitch assumes source encoded in ACP (Windows
1254 for turkish).

Solution: Widestrings and FP IDE are not compatible. 1) use strings instead
of widestrings 2) use unicode (UTF-8) enabled editor instead of FP.

For developers:
Do not you consider write(widestring) implementation without conversion into
ansistring better? For example: writting into console may be implemented
using WriteConsole(W) instead of WriteFile.



----- Original Message -----
From: "Marco van de Voort" <[hidden email]>
To: "FPC-Pascal users discussions" <[hidden email]>
Sent: Saturday, August 26, 2006 6:26 PM
Subject: Re: [fpc-pascal] International Characters in Console mode
programs...


>> I cannot manage to print any Turkish characters in console. (Code Page
>> ISO-8859-9), I use Windows XP Turkish, I can type and display Turkish
>> characters, but if my FP program's output displays these kind of text,
>> only spaces or "?" appear instead of intended characters. I use
>> widestrings to represent these chars. There is something I don't do
>> right I am sure, but what is it? Thanks in advance.
>
> This is one of the issues that 2.0.4 should at least improve upon. See the
> 2.0.4 versions on the FTP site.
> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: International Characters in Console mode programs...

Rimgaudas Laucius

>2) use unicode (UTF-8) enabled editor instead of FP.
Any windows editor will fit too.

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal