Opened 15 years ago
Closed 15 years ago
#98 closed defect (fixed)
Fonts: codepage handling
Reported by: | chennecke | Owned by: | |
---|---|---|---|
Priority: | blocker | Milestone: | Qt Beta 4 |
Component: | General | Version: | 4.5.1 Beta 3 |
Severity: | Keywords: | ||
Cc: |
Description
Special characters in the text of, e.g., menus and dialogs is currently displayed wrongly. See screenshot. This not only applies to text displayed with Workplace Sans but also other fonts.
I guess the solution would be to either use Unicode fonts or implement a codepage conversion. Given the implications of the first, I'd prefer the latter solution.
Attachments (1)
Change History (10)
by , 15 years ago
Attachment: | font_handling.png added |
---|
comment:1 by , 15 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Are you sure you have read README.OS2 carefully? Probably not:
3. Make sure you have the LANG environment variable properly set. The format is ll_CC[.codepage] where ll is the language code, CC is the country code and codepage is the optional code page to use. If LANG is missing or invalid, string conversion operations may work incorrectly resulting in distorted text input or output.
So, if you want umlauts, do something like 'set LANG=de_DE.850' provided that country is Germanu and your system code page is 850 (replace it with the correct language code and the codepage number if not).
There is ticket #49 that addresses this issue in more detail.
Feel free to reopen this ticket if this solution doesn't work for you.
comment:2 by , 15 years ago
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
The setting does help with static text in menus and dialogs but the problem with file names in the file open dialog remains.
comment:3 by , 15 years ago
Milestone: | Qt Enhanced → Qt Beta4 |
---|
Okay, I see. The file name conversion code should use exactly the same routines but I need to check this.
Will try to do it for Beta4.
comment:4 by , 15 years ago
Just found that the problem also occurs in window title bars.
To reproduce, change LANG to de_DE.850, start SMPlayer with the language files in place, and open the File Open dialog. The title should be "Datei öffnen" but the "ö" is not displayed correctly. Looks like when ISO-8859-1 content is displayed as cp850.
comment:5 by , 15 years ago
Priority: | major → blocker |
---|
marking as blocker, as it's not only a cosmetic issue.
comment:6 by , 15 years ago
The only explanation I can see is that your system code page in OS/2 is somehow *not* cp850...
Title bars and filenames are controlled by the OS so that they can only use the system code page while all the text inside the Qt widgets is drawn by Qt itself and can be whatever it wants. In particular, Qt uses utf8/ucs internally when storing strings of text and also when searching for glyphs in fonts; specifying the encoding in LANG doesn't influence this process at all -- it only tells Qt which code page it should convert file names from and which code page it should convert window titles to.
Please post your COUNTRY line from config.sys here. And try iso-8859-1 in LANG instead of cp850 and tell me if you see any difference. And please try setting different desktop fonts in the OS/2 palette (better, some modern ttf that definitely has all the Latin glyphs) and see if it changes anything.
comment:7 by , 15 years ago
Ah and as you probably noticed, that you should write
set LANG=de_DE.cp850
e.g. prepend "cp" in front of the code page number. Qt doesn't understand IBM code page numbers directly. I'll mention that in the README.OS2 too.
comment:8 by , 15 years ago
Please check that in r291 README.OS2 provides enough information to correctly set the LANG environment.
comment:9 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
ok i can confirm if one adds the right lang setting it works. with set Lang = de_CH.cp850 i see all umlauts right.
File open dialog with incorretcly displayed umlauts