View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0035948||FPC||Textmode IDE||public||2019-08-10 16:05||2020-11-15 18:14|
|Reporter||Luděk Šťastný||Assigned To||Florian|
|Platform||Linux||OS||Arch Linux, Debian, Slackware|
|Summary||0035948: Czech characters in console when using Free Pascal textmode IDE|
|Description||I am currently programming in Freepascal, with which I am very satisfied. I use Arch linux and MATE on my laptop, Lazarus works as I expect and I can easily insert Czech characters.|
However, I often need to edit the source code in a Linux terminal without a graphical environment and I really like the console FP IDE. Although my console is enabled for UTF-8 in Czech and it runs smoothly, specific Czech characters á, é, í, ť, ň and so on are poorly displayed in this IDE, see appendix. In Windows or using WINE, everything is OK. I tried the international US keyboard or I was set Czech character map from UTF-8 to ISO-8859-2, but nothing helped.
Questions from discussion forums:
(in Czech language)
did not help.
The problem generally occurs in Linux, I tried Arch, Debian, Slackware and SUSE, FP IDE probably ignores console settings and cannot insert UTF-8 specific characters.
Of course I can use eg Emacs in the console, but FP-IDE is a simple and fully usable environment (in development version 3.1 in Linux also works GBD, which I did not break in stable 3.0) and I would like to use it for programming.
Can I ask for a check or instructions on how to make Czech characters work?
|Steps To Reproduce||Please install Czech keyboard and try this characters:|
á, é, í, ť, ď
|Tags||No tags attached.|
|Fixed in Revision|
1_czech_characters_in_terminal_and_fpide_linux.png (24,555 bytes)
1_czech_characters_in_terminal_and_fpide_linux.png (24,555 bytes)
||Writeln in linux terminal shows utf-8 characters properly. Text mode IDE puts character by character directly in video buffer. That's the reason characters look like in your screen shoots.|
Thank you very much for the quick response, if I understand well, FP IDE uses a console framebuffer that does not support Czech characters. I have encountered this already in the framebuffer version of Netsurf web browser, where I can also use only US characters.
In addition to the Czech language, there will certainly be a problem with Russian, Chinese or Spanish. Aren't developers planning any change to resolve these issues by the next release of FP IDE? I do not know how technically demanding it is, in any case FP IDE is in my opinion an excellent environment and I would like to use it as much as possible.
You can use FP IDE with Czech and/or other international characters, but it's limited to single-byte character sets (i.e. you cannot use UTF-8, which uses varying amount of bytes for different characters). I understand that this is a serious limitation nowadays, but it's caused by the fact that FP IDE is based on Free Vision, which was designed to be compatible with the Turbo Vision object library originally included with TP/BP. Unfortunately, it isn't easily possible to keep compatibility with Turbo Vision while allowing full support of multi-byte character sets. It should be possible to change your terminal settings to a different character set, it should work then.
In addition, note that support for different character sets has been extended considerably in later versions of FPC (3.x). However, these versions may not be available in various Linux distributions yet (you can install them directly by downloading from https://www.freepascal.org/ or http://www.lazarus-ide.org if you prefer working in the GUI IDE). Note: I mentioned the 3.x versions due to your reference to FPC 2.4.4 in the Ubuntu forum; I see that you refer to 3.0.4 in the header of this bug report, i.e. you may already have the latest released version if the ticket information is correct.
Thank you very much for detailed info, Tomas.
I am currently using Arch Linux with FP IDE 3.0.4 and tried the same version in Debian. I also translated the 3.1 development series with the same result.
I understand that when using the Free Vision library I will not be able to work with UTF-8, in a terminal without X and then mate-terminal I tried:
export LANG = cs_CZ.ISO8859-2
localedef -i cs_CZ -f "ISO-8859-2" cs_CZ
including Windows and IBM character sets, but the situation is similar, see the new screenshot.
There is currently no solution to this problem, so I will use another editor with syntax highlighting in the console and then either directly translate or load it into the FP IDE. In this case, although I see incorrect characters, the resulting translation is fine and the application works correctly.
||May I suggest Geany. It has good fpc support.|
||Yes, in my experience, Geany is an excellent lightweight IDE and together with Lazarus ideal for creating console and graphics applications. For my is important be able to login to the server remotely with a suitable GUI IDE, I increasingly like VS Code, which has in addition to basic Pascal support and excellent plugins for other languages of my interest, ie, C, Python, Go and TADS3 plus allow remote debugging programs. Thank you very much for your observations, it is great that we have so many tools available for free and we can choose the most suitable for each of us.|
> I understand that when using the Free Vision library I will not be able to work with UTF-8
Adopting Free Vision to UTF-8 is possible, but needs some work. Discussed here:
|2019-08-10 16:05||Luděk Šťastný||New Issue|
|2019-08-10 16:05||Luděk Šťastný||File Added: 1_czech_characters_in_terminal_and_fpide_linux.png|
|2019-08-10 16:05||Luděk Šťastný||File Added: 2_czech_characters_in_terminal_and_fpide_windows_over_wine.png|
|2019-08-10 20:01||Marģers||Note Added: 0117625|
|2019-08-11 08:18||Luděk Šťastný||Note Added: 0117634|
|2019-08-19 00:34||Tomas Hajny||Note Added: 0117732|
|2019-08-19 00:37||Tomas Hajny||Note Edited: 0117732||View Revisions|
|2019-08-21 14:50||Luděk Šťastný||File Added: FP_IDE_8859_2.png|
|2019-08-21 14:50||Luděk Šťastný||Note Added: 0117764|
|2019-08-21 16:47||Thaddy de Koning||Note Added: 0117766|
|2019-08-23 14:42||Luděk Šťastný||Note Added: 0117794|
|2020-11-01 21:29||Ivan Sorokin||Note Added: 0126691|
|2020-11-15 18:14||Florian||Assigned To||=> Florian|
|2020-11-15 18:14||Florian||Status||new => resolved|
|2020-11-15 18:14||Florian||Resolution||open => duplicate|
|2020-11-15 18:14||Florian||FPCTarget||=> -|
|2020-11-15 18:14||Florian||Relationship added||duplicate of 0021373|