I always had problems with simplified Chinese in SuSE, and this problem remains in SuSE 9.3, so I address it here. The difference between simplified and traditional Chinese is, that some characters have been simplified. This means, ~80% of the characters remain the same, but some characters are now simpler. Simplified Chinese is used in China mainland, where traditional Chinese is still used in Taiwan. In SuSE 9.3, when I select simplified Chinese as secondary language, everything works nearly fine, when I enter Ctrl-Space, I get a SCIM popup, where I can choose "Intelligent Pinyin" as input method. The problem now is, that only characters that are the same in simplified and traditional Chinese are shown in all programs (means in the SCIM, in KWrite, in konsole, etc.). All characters that are different in simplified Chinese are not shown at all (empty characters, like "space"). This means, I can only see the ~80% characters that are unchanged. Of course, it works, if I change the font either to a simplified Chinese font, or to GNU Unifont. It seems, as if the font substitution were not correctly configured for simplified Chinese. I have installed all available fonts. Of course, I don't want to define a substitute font for all of my fonts! But still, Chinese should work under all circumstances. I have newly installed SuSE 9.3 (not upgraded) and I have created a new user with SuSE default settings, so it is definitely not an upgrade problem. Some questions: - What is the simplest way for me to correct this? - Can I patch it in the global /etc (for all users)? - When and how will SuSE correct this? (Mike?) - Why aren't there more people from China complaining this? Have I some special configuration, which does not work (e.g. my main language is German, one of my secondary languages is simplified Chinese)? Thank you Regards Marc
Marc Waeckerlin
Some questions: - What is the simplest way for me to correct this?
LC_CTYPE=zh_CN.UTF-8 Our Qt package contains some hacks to prefer simplified Chinese fonts when running in a simplified Chinese locale. Whey you are running in non-Chinese locales like de_DE.UTF-8, en_US.UTF-8, ..., this hack doesn't do anything. Apparently you are running with LC_CTYPE not set to zh_CN.UTF-8 and you get traditional Chinese fonts.
- Can I patch it in the global /etc (for all users)?
You can edit the font substitutions in /etc/X11/qtrc to prefer simplified Chinese fonts.
- When and how will SuSE correct this? (Mike?)
It is a Qt problem that Qt cannot fallback to a different font when some glyphs are missing. When using GTK2 in zh_TW.UTF-8 locale for example, a traditional Chinese font will be preferred. But when glyphs are used which are not available in that font, GTK2 continues to search for other fonts which have the missing glyphs. I.e. you will get a mixture of glyphs from different fonts which may not look nice but at least it is readable. Qt can currently use only *one* font for the Han region. To get the right one, you have to set LC_CTYPE to your preferred language. Even for GTK2 you have to do that if you want optimal results for your preferred language.
- Why aren't there more people from China complaining this?
Because they are using zh_CN.UTF-8 locale.
Have I some special configuration, which does not work (e.g. my main language is German, one of my secondary languages is simplified Chinese)?
Yes, I think that is the reason.
But you can leave your KDE settings German, that is no problem. You
only need to set LC_CTYPE=zh_CN.UTF-8. For example, the following
setting should be OK for you:
export LANG=de_DE.UTF-8
export LC_CTYPE=de_DE.UTF-8
(all other LC_ variables unset in this example).
You have to give a hint somewhere that you prefer simplified Chinese
fonts over traditional Chinese fonts. Qt will check LC_CTYPE to find
out which font to prefer. And you can use qtrc for fine tuning.
GTK also uses LC_CTYPE to select the preferred fonts because GTK just
uses fontconfig and that checks LC_CTYPE.
Qt also uses fontconfig, but not as directly as GTK, Qt has many
additional hacks which are more harmful than useful currently.
I hope this will get better with Qt4.
Anyway, it will always be a good idea to set LC_CTYPE either to
zh_CN.UTF-8 or zh_TW.UTF-8 to give a hint which fonts you prefer.
--
Mike FABIAN
Am Dienstag, 17. Mai 2005 14.21 schrieb Mike FABIAN
Marc Waeckerlin
さんは書きました: Some questions: - What is the simplest way for me to correct this?
LC_CTYPE=zh_CN.UTF-8
Yes, you are completely right, I forgot this. I always did it before, but forgot it this time, because I always have to edit /etc/sysconfig/language after installation. It would be nice, if I could enter this during the installation in YaST, then I would not forget it. BTW: (off topic) 1) RC_LANG is setup as "de_DE.UTF-8", but since I live in Switzerland, this should be "de_CH.UTF-8". Also, it seems that "de_CH.UTF-8" is not even an official language setting - why? 2) Language setup: Here SuSE could definitively learn from (k)ubuntu distribution: There I first choose my language (German), then I get a dialog to choose my country from a list of predefined Countries, for German this is Germany, Austria, Switzerland, Luxemburg, Belgium and "other". This way, with only two choices, all localization parameters can be setup correctly, i.e. keyboard and time. Thank you Regards Marc
Marc Waeckerlin
Am Dienstag, 17. Mai 2005 14.21 schrieb Mike FABIAN
LC_CTYPE=zh_CN.UTF-8
Yes, you are completely right, I forgot this. I always did it before, but forgot it this time, because I always have to edit /etc/sysconfig/language after installation. It would be nice, if I could enter this during the installation in YaST, then I would not forget it.
I wonder how the user interface should look like. This is really a very special case, this problem occurs when you want to use Japanese or Chinese and set your main language to something else. This is because Japanese, simplified Chinese, and traditional Chinese overlap in the Han region in Unicode and therefore you have to indicate your font preferences somehow. If one of these languages is your main language already and you do not care about the other CJ languages, there is no problem. If you want to use all Japanese, simplified Chinese, *and* traditional Chinese at once, you have to carefully think about which fonts to use or it won't look nice in GTK and glyphs will be missing in KDE. For other languages than CJ there is no such problem because there is no overlap in the Unicode range. So this problem only affects CJ users who want to set their main locale to something non-CJ. A small group probably. Maybe one could extend the "Expert Language settings" dialog in YaST2 to edit LANG and all the LC_ variables. Currently you can only choose whether to use UTF-8 or not and the value of ROOT_USES_LANG in that dialog. Just making it possible to edit all the LC_ variables in such an expert dialog wouldn't be enough because very few people know that LC_CTYPE affects font settings for example. I.e. such a dialog would need a lot of explanation for each variable: "Set this variable to achieve the following effects: bla bla ..." Would be a complicated dialog. Do you really think this would be useful? Or do you have a better idea?
BTW: (off topic)
1) RC_LANG is setup as "de_DE.UTF-8", but since I live in Switzerland, this should be "de_CH.UTF-8". Also, it seems that "de_CH.UTF-8" is not even an official language setting - why?
What do you mean by "official"? Of course you can set your locale to de_CH.UTF-8 (by editing /etc/sysconfig/language), this locale is supported by glibc and contained in the glibc-locale package. You think it is not "official" just because you cannot set it easily with YaST2?¹
2) Language setup: Here SuSE could definitively learn from (k)ubuntu distribution: There I first choose my language (German), then I get a dialog to choose my country from a list of predefined Countries, for German this is Germany, Austria, Switzerland, Luxemburg, Belgium and "other". This way, with only two choices, all localization parameters can be setup correctly, i.e. keyboard and time.
I think this would be useful, especially for Switzerland because the
keyboard is considerably different from the German keyboard. I'll try
to talk with the YaST2 developers how much time it would need to
implement that.
Footnotes:
¹ actually you can set it with YaST2 because you can set any
variable in /etc/sysconfig with the YaST2 sysconfig editor,
but I would not call that "easy".
--
Mike FABIAN
Am Dienstag, 17. Mai 2005 16.12 schrieb Mike FABIAN
This is because Japanese, simplified Chinese, and traditional Chinese overlap in the Han region in Unicode and therefore you have to indicate your font preferences somehow. If one of these languages is your main language already and you do not care about the other CJ languages, there is no problem. If you want to use all Japanese, simplified Chinese, *and* traditional Chinese at once, you have to carefully think about which fonts to use or it won't look nice in GTK and glyphs will be missing in KDE.
Even though my main Asian language is simplified Chinese (zh_CN), I sometimes also need Japanese (jp) and Korean (ko). Also, for reasons of beauty, I use traditional Chinese (zh_TW) in special (old stylish) documents (e.g. poems). So, you mean I can get zh_CN to work properly, but then I have trouble using jp or zh_TW? Is there a workaround? I probably don't have a problem with Chinese, when I use a font in OpenOffice that exists in zh_CN and zh_TW, such as AR-Kaiti and AR-Songti, which exists as GB (zh_CN) and Big5 (zh_TW)? What do Chinese people do, when they sometimes have to write letters in Japanese, e.g. if the work in the Chinese branch of Sony? Thank you Regards Marc
Marc Waeckerlin
Even though my main Asian language is simplified Chinese (zh_CN), I sometimes also need Japanese (jp) and Korean (ko). Also, for reasons of beauty, I use traditional Chinese (zh_TW) in special (old stylish) documents (e.g. poems).
So, you mean I can get zh_CN to work properly, but then I have trouble using jp or zh_TW?
No, because the default font when you use zh_CN.UTF-8 is FZSongTi (package ttf-founder-simplified must be installed!)
Is there a workaround?
Use the FZSongTi font. This is a very comprehensive font which has not only the glyphs needed for simplified Chinese but also for traditional Chinese and Japanese. For Japanese you have to accept some compromises in style (have a look at the glyph for 直 in that font for example). But it will be readable.
I probably don't have a problem with Chinese, when I use a font in OpenOffice that exists in zh_CN and zh_TW, such as AR-Kaiti and AR-Songti, which exists as GB (zh_CN) and Big5 (zh_TW)?
The Arphic fonts are not as comprehensive as FZSongTi, I think you will be happier with FZSongTi. I'll "upgrade" the Arphic fonts soon to the improved versions by Arne Götje. He merged "AR PL SungtiL GB" and "AR PL Mingti2L Big5" into one font supporting both simplified and traditional Chinese ("AR PL ShanHeiSun Uni") and did the same for the Kaiti versions to create the new "AR PL ZenKai Uni". He plans to add more glyphs to make these fonts comprehensive enough to support Japanese as well.
What do Chinese people do, when they sometimes have to write letters in Japanese, e.g. if the work in the Chinese branch of Sony?
Use a font which has all needed glyphs? Readable, but you have to
decide whether you want a Chinese or Japanese style font.
Or rely on the fallbacks in GTK2 to automatically use different
fonts for missing glyphs (maybe ugly).
For extreme high quality like in printing you may need a markup system
(like HTML, Docbook, LaTeX, ... or even OpenOffice) where you can
specify which font should be used for which part of the text.
--
Mike FABIAN
Marc Waeckerlin
さんは書きました:
2) Language setup: Here SuSE could definitively learn from (k)ubuntu distribution: There I first choose my language (German), then I get a dialog to choose my country from a list of predefined Countries, for German this is Germany, Austria, Switzerland, Luxemburg, Belgium and "other".
What is "other"?
This way, with only two choices, all localization parameters can be setup correctly, i.e. keyboard and time.
Maybe it would be a good idea to select the territory automatically
from the timezone?
There is a dialog to set the timezone already in YaST2.
Maybe it would make sense to extend that to set the territory (like CH
in de_CH.UTF-8) as well?
Of course one can imagine that a user does not live in Switzerland and
therefore doesn't want to choose Switzerland in the timezone settings
but nevertheless wants de_CH.UTF-8 as the default (maybe she has a
Swiss keyboard?).
--
Mike FABIAN
Am Dienstag, 17. Mai 2005 16.27 schrieb Mike FABIAN
Marc Waeckerlin
さんは書きました: 2) Language setup: Here SuSE could definitively learn from (k)ubuntu distribution: There I first choose my language (German), then I get a dialog to choose my country from a list of predefined Countries, for German this is Germany, Austria, Switzerland, Luxemburg, Belgium and "other".
What is "other"?
If you speak German, but do not live in a German speaking country, e.g. German in France or so. "other" means, select any country.
This way, with only two choices, all localization parameters can be setup correctly, i.e. keyboard and time.
Maybe it would be a good idea to select the territory automatically from the timezone?
Vice versa is better. For Joe Average, the important things are his language and his country, not his timezone and his keyboard layout. Of course, if you live in a country that contains several timezones, you need a more deeper information. But here again, for Joe Average, it would probably be better to choose the province, state or region (e.g. China - East-Coast). I don't know, how Ubuntu solved this problem. I'd recommend to copy Ubuntu's approach.
Maybe it would make sense to extend that to set the territory (like CH in de_CH.UTF-8) as well?
It's also a possibility. Don't forget the country settings in KDE (and GNOME?)...
Of course one can imagine that a user does not live in Switzerland and therefore doesn't want to choose Switzerland in the timezone settings but nevertheless wants de_CH.UTF-8 as the default (maybe she has a Swiss keyboard?).
Learn from Ubuntu: They ask language and country, then suggest a timezone and keyboard layout, which can be accepted or changed. Regards Marc
Marc Waeckerlin
Am Dienstag, 17. Mai 2005 16.27 schrieb Mike FABIAN
> unter "Re: [m17n] Simplified Chinese in SuSE": Marc Waeckerlin
さんは書きました: 2) Language setup: Here SuSE could definitively learn from (k)ubuntu distribution: There I first choose my language (German), then I get a dialog to choose my country from a list of predefined Countries, for German this is Germany, Austria, Switzerland, Luxemburg, Belgium and "other".
What is "other"?
If you speak German, but do not live in a German speaking country, e.g. German in France or so. "other" means, select any country.
But you cannot select any country for the locale settings, you have to stick to the locales supported by glibc. For German these are currently de_DE, de_AT, de_CH, de_LU, de_BE. That's it, there is no "other". So "other" can only mean "I don't care" which then probably selects de_DE. That's why I asked.
Maybe it would be a good idea to select the territory automatically from the timezone?
Vice versa is better. For Joe Average, the important things are his language and his country, not his timezone and his keyboard layout. Of course, if you live in a country that contains several timezones, you need a more deeper information.
There are also countries with several keyboard layouts in common use.
But here again, for Joe Average, it would probably be better to choose the province, state or region (e.g. China - East-Coast). I don't know, how Ubuntu solved this problem. I'd recommend to copy Ubuntu's approach.
Have you tried whether this really works well in all corner cases?
--
Mike FABIAN
Am Dienstag, 17. Mai 2005 17.13 schrieb Mike FABIAN
But here again, for Joe Average, it would probably be better to choose the province, state or region (e.g. China - East-Coast). I don't know, how Ubuntu solved this problem. I'd recommend to copy Ubuntu's approach.
Have you tried whether this really works well in all corner cases?
Well, as I said, I was astonished by the simple, straight forward installation procedure of Kubuntu (but some things were too simple for me, so I switched back to SuSE). I can recommend you to have an eye on it. But I only checked it for my case. I'd suggest that your YaST maintainer has a closer look on the Ubuntu installation, with special respect to the localization settings. I think it would be worth to invest a day, or even a week, for deeper analysis. Regards Marc
Am Dienstag, 17. Mai 2005 16.12 schrieb Mike FABIAN
I wonder how the user interface should look like. This is really a very special case, this problem occurs when you want to use Japanese or Chinese and set your main language to something else.
YaST has now a nice feature to specify a primary and a list of secondary languages. If you install a primary language that is not Chinese or Japanese, but one of the two Chinese or Japanese as secondary language, then CTYPE could be set to that secondary language. If in primary and secondary language, there are more than only one of both Chinese and Japanese, YaST could detect an unresolvable conflict, and display an information on this (if there is no solution to this problem).
Maybe one could extend the "Expert Language settings" dialog in YaST2 to edit LANG and all the LC_ variables. Currently you can only choose whether to use UTF-8 or not and the value of ROOT_USES_LANG in that dialog.
Yes, that's a nice idea: Offer CTYPE in the experts dialog, and select the default as mentioned above. Select the main language (here I would like to correct de_DE to de_CH) and the CTYPE would be enough for me (in addition to the already existing "UTF-8" (why should one not use UTF-8?!?) and "ROOT_USES_LANG" question).
Just making it possible to edit all the LC_ variables in such an expert dialog wouldn't be enough because very few people know that LC_CTYPE affects font settings for example.
Add a small text regarding this CTYPE topic to the help on the left.
What do you mean by "official"? Of course you can set your locale to de_CH.UTF-8 (by editing /etc/sysconfig/language), this locale is supported by glibc and contained in the glibc-locale package.
Ah, ok. But it is not in the list of supported language settings in the comment of the /etc/sysconfig/language file. That's why I though it was unsupported. Why isn't it setup correctly by the YaST? Well, probably because I cannot select my Country. Selecting the country would be better, than editing this file by hand and selecting keyboard and timezone separately (as in ubuntu)...
I think this would be useful, especially for Switzerland because the keyboard is considerably different from the German keyboard. I'll try to talk with the YaST2 developers how much time it would need to implement that.
Cool, this would resolve the de_DE vs. de_CH problem. Same of course for de_AT. Also different in Switzerland, AFAIK, is the currency, some numbering and time rendering (we have 1'234,56 and hh.mm -> how is it in Germany?). We Swiss also have to edit the KDE country and language settings for each user after installation.
¹ actually you can set it with YaST2 because you can set any variable in /etc/sysconfig with the YaST2 sysconfig editor, but I would not call that "easy".
I consider opening the file in xemacs as easier... Thank you Regards Marc
Marc Waeckerlin
YaST has now a nice feature to specify a primary and a list of secondary languages.
If you install a primary language that is not Chinese or Japanese, but one of the two Chinese or Japanese as secondary language, then CTYPE could be set to that secondary language.
Not a bad idea. But there are some problems. You will get Chinese fonts by default then. For example, xfd -fa sans will default to a Chinese font. In applications which can use only one single font, this will usually have the effect that you don't get German Umlauts anymore, unless your Chinese default font has Umlauts. Applications which are able to use several fonts at once (GTK, Qt, ...) may be able to display the Umlauts correctly. But the Umlauts used may be from a different font than the glyphs used for ASCII (which are from the Chinese default font). This is of course readable but ugly. I.e. if this is a multi user system where you install CJK stuff because some users want to use CJK, you probably do not want to set LC_CTYPE=zh_CN.UTF-8 for all users. In that case, users interested in CJK should set it in their personal ~/.profile.
If in primary and secondary language, there are more than only one of both Chinese and Japanese, YaST could detect an unresolvable conflict, and display an information on this (if there is no solution to this problem).
If the list of languages were an ordered list, like in the KDE control centre where you can add languages to the list or remove them and move languages up and down in the list, there would be no unresolvable conflict, one could give the CJ language higher up in the list priority for LC_CTYPE. But, as I wrote above, setting LC_CTYPE to a CJK locale different from your main language may cause some problems. Therefore, although this may be a fine default for you, it may not be the best default for everybody.
Maybe one could extend the "Expert Language settings" dialog in YaST2 to edit LANG and all the LC_ variables. Currently you can only choose whether to use UTF-8 or not and the value of ROOT_USES_LANG in that dialog.
Yes, that's a nice idea: Offer CTYPE in the experts dialog, and select the default as mentioned above.
Select the main language (here I would like to correct de_DE to de_CH) and the CTYPE would be enough for me (in addition to the already existing "UTF-8" (why should one not use UTF-8?!?)
Nowadays I don't see any reason not to use UTF-8 either.
What do you mean by "official"? Of course you can set your locale to de_CH.UTF-8 (by editing /etc/sysconfig/language), this locale is supported by glibc and contained in the glibc-locale package.
Ah, ok. But it is not in the list of supported language settings in the comment of the /etc/sysconfig/language file. That's why I though it was unsupported.
That list is a bit strange. Somebody edited that list manually a while ago and just listed some locales he thought to be useful. This is not a complete list at all. It would be better if that list could be generated automatically from the list of locales supported on the installed system, currently it is just a hardcoded list with no particular meaning.
Also different in Switzerland, AFAIK, is the currency, some numbering and time rendering (we have 1'234,56 and hh.mm -> how is it in Germany?).
Numbers are written like 1.234,56.
Glibc doesn't appear to make a difference in the time format
between de_DE and de_CH, both in /usr/share/i18n/locales/de_DE
and /usr/share/i18n/locales/de_CH there is
t_fmt "<U0025><U0054>"
which is %T (time, 24-hour (hh:mm:ss), see the man-page of "date").
mfabian@magellan:~$ LANG=de_CH.UTF-8 date
Die Mai 17 17:41:15 CEST 2005
mfabian@magellan:~$ LANG=de_DE.UTF-8 date
Di Mai 17 17:41:25 CEST 2005
mfabian@magellan:~$
This may be an error in glibc of course, if you think it is you may
file a bug in the glibc bugzilla.
--
Mike FABIAN
So, you mean it's not a good default? But at least a hint
and the possibility to configure CTYPE in YaST would be
nice for those useres that don't read this mailinglist.
It's probably a common pitfall for the small community of
CJ-bilinguals.
Am Dienstag, 17. Mai 2005 17.46 schrieb Mike FABIAN
mfabian@magellan:~$ LANG=de_CH.UTF-8 date Die Mai 17 17:41:15 CEST 2005 mfabian@magellan:~$ LANG=de_DE.UTF-8 date Di Mai 17 17:41:25 CEST 2005 mfabian@magellan:~$
This may be an error in glibc of course, if you think it is you may file a bug in the glibc bugzilla.
Definitively wrong. In Switzerland (and I suppose in Germany too), day is always before month and time is separated with a single dot. KDE does it right, it declares time as: "SS.MM:SEKSEK" and date as: "WOCHENTAG, tT. MONAT JJJJ" and short date as: "tT mM. JJ" (that's wrong AFAIK, day is always followed by a dot). So, with de_CH, your example should probably render to: Dienstag, 17. Mai 2005 17.41:15 Regards Marc
Marc Waeckerlin
Am Dienstag, 17. Mai 2005 17.46 schrieb Mike FABIAN
mfabian@magellan:~$ LANG=de_CH.UTF-8 date Die Mai 17 17:41:15 CEST 2005 mfabian@magellan:~$ LANG=de_DE.UTF-8 date Di Mai 17 17:41:25 CEST 2005 mfabian@magellan:~$
This may be an error in glibc of course, if you think it is you may file a bug in the glibc bugzilla.
Definitively wrong. In Switzerland (and I suppose in Germany too), day is always before month and time is separated with a single dot. KDE does it right, it declares time as: "SS.MM:SEKSEK" and date as: "WOCHENTAG, tT. MONAT JJJJ" and short date as: "tT mM. JJ" (that's wrong AFAIK, day is always followed by a dot). So, with de_CH, your example should probably render to: Dienstag, 17. Mai 2005 17.41:15
I recently reported an error in the output of the date command
in simplified Chinese locale, see
http://sources.redhat.com/bugzilla/show_bug.cgi?id=811
If you are sure that the Swiss time format in glibc is wrong,
it is probably a good idea to file a similar bugreport.
If you read the above bugreport you can easily make a similar
patch to change the time format in a Swiss locale.
--
Mike FABIAN
Marc Waeckerlin
So, you mean it's not a good default?
It's not bad, that's why I recommended it. It is probably the best setting for you, but I can think of cases where it may cause problems.
But at least a hint and the possibility to configure CTYPE in YaST would be nice for those useres that don't read this mailinglist. It's probably a common pitfall for the small community of CJ-bilinguals.
Yes, probably. I'll discuss this with the YaST2 developers.
--
Mike FABIAN
This information is in German only. Ich habe meine Internetseite an SuSE 9.3 und die besprochenen Probleme angepasst: http://marc.wäckerlin.ch/linux/i18n.php (http://marc.waeckerlin.org/linux/i18n.php) Von allgemeinem Interesse dürften besonders auch die Tastaturbelegungsdokumentation sein. Für Kritik bin ich immer dankbar. Gruss Marc
participants (2)
-
Marc Waeckerlin
-
Mike FABIAN