Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2006-08

International Characters in Console mode programs...

4 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

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

Reply by email

Marco van de Voort
to S.Anıl Yılmaz
Show quoted text 6 lines
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.

Reply by email

Rimgaudas Laucius
to Marco van de Voort

Hello,

i cast a 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.

Earlier message 21 lines
----- Original Message ----- From: "Marco van de Voort" To: "FPC-Pascal users discussions" 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 - > http://lists.freepascal.org/mailman/listinfo/fpc-pascal >

Reply by email