LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Weird box characters when trying to input Chinese with scim (https://www.linuxquestions.org/questions/slackware-14/weird-box-characters-when-trying-to-input-chinese-with-scim-4175511214/)

Sansveni 07-15-2014 08:01 PM

Weird box characters when trying to input Chinese with scim
 
I recently enabled SCIM (found out it was already installed) and finally got it to switch on after restarting my computer. I'm using Slackware 14.1 (though updated to where current was at when the 3.14.4 kernel was released) running Xfce. However, whenever I input Chinese characters (I'm using zhu yin to input), most of the ones shown seem to be in weird box-shaped characters. For example, with this: 㰤䆰䊸 I see three boxes, each with four letters or numbers inside. I entered a lot of these characters into Google and got a lot of search results for them, and in the results, I see occasional rogue boxes being displayed mixed within the Chinese.

I tried scim with KDE too just in case but it was the same.

However, whenever I go to Chinese webpages using any other way, (I started hunting around pages with lots of characters) I don't see a single box in place of a character - everything's displayed just fine - and I uploaded some of the box/rectangle characters to a document online, along with a link to a webpage I got from Google searching a box-character, and then opened the file with my phone...

...and the phone showed them all, correctly in plain, Chinese characters. I Google searched two of them in the document, some of the ones that my Slackware apparently can't display correctly, picked a search result, and then tried to find the exact same Google result on my Slackware computer...I did so by just copying the web address but into Google.

And then it could display that particular character just fine!

The thing is, when inputting with scim, the majority of the characters show as boxes with letters, but some aren't. Oftentimes most of them in the first page, or slide, of options are boxy, but then I'll get a page of them that mostly aren't (all of these are different characters), then again boxy ones.

I'm very confused by this and have no idea why some are properly displayed, and some are not, and why I can only produce these box characters with scim. What's even more confusing is why these characters can then be used to find a lot of webpages that contain this character, but then, apparently, I can find webpages on the same computer where that same character is properly displayed!

Any help will be greatly appreciated.

dwblas 07-16-2014 10:10 AM

That can mean that the characters can not be displayed because SCIM does not know how to handle the character set. A similar post is here and there has to be more on the web on this. If SCIM has a forum, I would also suggest that you search there.

Qury 07-16-2014 11:25 AM

Check your default font.
I've seen this before when there font i was using did not support CJK characters.
Try to install one of the fonts that are listed here: http://en.wikipedia.org/wiki/List_of_CJK_fonts and switch to that.

Didier Spaier 07-16-2014 12:36 PM

Slackware includes the true type collection /usr/share/fonts/TTF/wqy-zenhei.ttc. I'd try this one.

Arkerless 07-16-2014 03:53 PM

I will add my voice to the suggestion that this is a font problem.

The boxes you describe sound like the characters that appear when the current font does not have any glyph in the required position.

Sansveni 07-17-2014 05:27 PM

Quote:

That can mean that the characters can not be displayed because SCIM does not know how to handle the character set. A similar post is here and there has to be more on the web on this. If SCIM has a forum, I would also suggest that you search there.
Hm... I'd been thinking that it might be SCIM's handling of the characters that was the problem. I searched with all the terms I could think of, but I guess I didn't know what to search for.

The problem in the other thread seems to be different though. The guy is trying to input in pinyin, but nothing is popping up in Chinese.

[The three other posts]
Ah, I hadn't even thought about the font being the problem (considering it could display some/most of the characters and I haven't been able to find a unicode box (or whatever those are) when not using SCIM. I found out that I was already using wqy-zenhei.ttc and had WenQuanYi Zen Hei + the mono version.

I looked up the name of the Slackware package: wqy-zenhei-font-ttf-0.8.38_1-noarch-2.txz and after looking around, found the English version of the website wenq.org: http://wenq.org/wqy2/index.cgi?actio...d=Home&lang=en

It says on the second font, the one that I'm using, that it's 63.8% completed, which would explain why it seems like a lot of the characters are missing. I think the website is out of date though, because it says the latest version is: v0.8.38 and http://sourceforge.net/projects/wqy/files/wqy-zenhei/ has the latest version being 0.9.45. I checked the readme of the 0.8.38 version, and it says there that the Chinese characters sets *are* completed. Hm...

I went and installed 0.9.45 anyway and removed the older version. It came with a third, extra "Sharp" font, but I still had that problem, except strangely enough, when starting to type in a character, the first character suggestions are all okay now, and only after flipping through a bit (usually) do you get to where all characters are missing. I searched one of them again, and found a picture, it seemed like a simple enough character (not obscure). Only character boxes with 6 letters inside (wider looking) now appear, not any with 4.

Thinking that maybe there's something wrong with this WenQuanYi font, I found another font (also through the wiki page, thank you for the link): http://www.freedesktop.org/wiki/Soft...onts/Download/ a lot of the links are dead, but the downloads still work. I downloaded the Uming tarball and installed the fonts, but I still get the same problem.

Is there a way to diagnose what's wrong with SCIM, or is there a Zhuyin alternative to SCIM?

BCarey 07-17-2014 07:28 PM

Are you using a UTF-8 locale?

Brian

Sansveni 07-17-2014 07:33 PM

Yes. I have /etc/profile.d/lang.sh set to en_US.UTF-8


All times are GMT -5. The time now is 04:52 PM.