Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HOw to input chinese in internet browser?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index 中文 (Chinese)
View previous topic :: View next topic  
Author Message
Gentoomen
n00b
n00b


Joined: 30 Dec 2006
Posts: 30

PostPosted: Thu Mar 01, 2007 2:04 am    Post subject: HOw to input chinese in internet browser? Reply with quote

Hi,

In gedit, I can right click to select scim input method, then ctrl+space to type pinyins. But in mozilla, I when i right click an input box, it does not have this scim input method. So how do you guys input chinese in browser?

Also, i'm trying copy some windows files with chinese name over to gentoo but the characters cannot be displayed. I am not sure if it have anything to do with localization. I followed the gentoo localization guide and added some language such as zh_cn in locale.gen then ran locale-gen. AFter that i did export LANG="zh_CNutf8" but locale changes back to
Code:
LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=

after restarting my comp. How to fix the problems?
Back to top
View user's profile Send private message
big
n00b
n00b


Joined: 18 Jan 2007
Posts: 69

PostPosted: Thu Mar 01, 2007 3:41 am    Post subject: Reply with quote

add these to you ~/.xinitrc or ~/.xsession:
Code:
export XMODIFIERS=@im=SCIM
export GTK_IM_MODULE="scim"

to activate scim input method in browser.

Quote:
Also, i'm trying copy some windows files with chinese name over to gentoo but the characters cannot be displayed. I am not sure if it have anything to do with localization. I followed the gentoo localization guide and added some language such as zh_cn in locale.gen then ran locale-gen. AFter that i did export LANG="zh_CNutf8" but locale changes back to

1.edit the file /etc/locale.gen
for example: add these to the file:
Code:
en_US ISO-8859-1
en_US.UTF-8 UTF-8
zh_CN GB18030
zh_CN.GBK GBK
zh_CN.GB2312 GB2312
zh_CN.UTF-8 UTF-8

2.execute locale-gen
3.edit the file /etc/env.d/100i18n:
add the following,for example:
Code:
LANG=en_US.UTF-8
LC_CTYPE=zh_CN.UTF-8
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"

3 at last you need to execute env-update and reboot your system.
More details,plz refer to http://zh.gentoo-wiki.com/
----------------------------------------------------------------------------------------------------------
if any of files mentioned above doesn't exist under a specify directory,just create one.
PS:~/.xinitrc is used by console command startx,if you login through xdm,choose ~/.xsession instead.
------------------------------------------------------------------------------------updated 4:47pm
_________________
be big,no bug


Last edited by big on Thu Mar 01, 2007 8:54 am; edited 1 time in total
Back to top
View user's profile Send private message
Gentoomen
n00b
n00b


Joined: 30 Dec 2006
Posts: 30

PostPosted: Thu Mar 01, 2007 6:25 am    Post subject: Reply with quote

Hi,

i look in my ~ directory and there is no .xinitrc nor .xsession. In /etc/env.d there is no 100i18n nor 02locale.
Back to top
View user's profile Send private message
Gentoomen
n00b
n00b


Joined: 30 Dec 2006
Posts: 30

PostPosted: Tue Mar 06, 2007 3:36 am    Post subject: Reply with quote

Hi,

Didn't see the last part:

----------------------------------------------------------------------------------------------------------
if any of files mentioned above doesn't exist under a specify directory,just create one.
PS:~/.xinitrc is used by console command startx,if you login through xdm,choose ~/.xsession instead.
------------------------------------------------------------------------------------updated 4:47pm

Anyway, i follow your instruction and got locale to work.

As for activating scim input method in browser, I created ~/.xsession and ran:

Code:
export XMODIFIERS=@im=SCIM
export GTK_IM_MODULE="scim"


in terminal but right clicking on an input box, there is still no scim input method to select. Not sure what export does, so I added:

Code:
export XMODIFIERS=@im=SCIM
export GTK_IM_MODULE="scim"
in ~/.xsession but that didn't work either. Is there something I am not doing right?
Back to top
View user's profile Send private message
big
n00b
n00b


Joined: 18 Jan 2007
Posts: 69

PostPosted: Tue Mar 06, 2007 5:31 am    Post subject: Reply with quote

hi,
try to restart X and press Ctrl+Space to activate scim in firefox.If you have any questions or if I may be of further assistance, please let me know.
Regards,
big.
_________________
be big,no bug


Last edited by big on Tue Mar 06, 2007 12:47 pm; edited 1 time in total
Back to top
View user's profile Send private message
Gentoomen
n00b
n00b


Joined: 30 Dec 2006
Posts: 30

PostPosted: Tue Mar 06, 2007 6:40 am    Post subject: Reply with quote

Hi big,

i did exactly as you told and same problem exist. ctrl+space only work in gedit text file after I right click and select scim input method first.

In firefox, scim input method does not appear at all after right clicking on a input box, so ctrl+space doesn't do anything.
What should i do now?

Not sure if this is part of the problem, i recently emerge scim-qtimm and when emerge completed, it have this part:

* After you emerged scim-qtimm, use right click to switch immodules for Qt.
* If you would like to use scim-qtimm as default instead of XIM, set
* % export QT_IM_MODULE=scim

I didn't do export QT_IM_MODULE=scim because I'm not sure what it will do. What do you suggest?
Back to top
View user's profile Send private message
big
n00b
n00b


Joined: 18 Jan 2007
Posts: 69

PostPosted: Tue Mar 06, 2007 12:40 pm    Post subject: Reply with quote

well, QT_IM_MODULE only affects those application programs based on qt.you should add this line if there are such programs running on your system.
locale is not the main factor causing your problem,even not a factor.Try to create a file .xprofile under your home directory or just create a link if you're having a .xsession:
Code:
$cd ~
$ln -s .xsession .xprofile

or create a new file:
Code:
$cd ~
$vi .xprofile
export XMODIFIERS=@im=SCIM
export GTK_IM_MODULE="scim"

(if you want to start scim when login,add scim -d to the end file)
LC_CTYPE is not required to be set to zh_CN.UTF-8,even if LC_CTYPE=en_US.UTF-8,scim will work smoothly as well.
Locale of my system:
Code:
LANG=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
LC_NUMERIC=en_US.UTF-8
LC_TIME=en_US.UTF-8
LC_COLLATE=en_US.UTF-8
LC_MONETARY=en_US.UTF-8
LC_MESSAGES=en_US.UTF-8
LC_PAPER=en_US.UTF-8
LC_NAME=en_US.UTF-8
LC_ADDRESS=en_US.UTF-8
LC_TELEPHONE=en_US.UTF-8
LC_MEASUREMENT=en_US.UTF-8
LC_IDENTIFICATION=en_US.UTF-8
LC_ALL=

scim does cooperate with it.
Have a try and good luck! Sorry i have got poor english,but did i make myself clearly?:D
Regards!
_________________
be big,no bug
Back to top
View user's profile Send private message
Gentoomen
n00b
n00b


Joined: 30 Dec 2006
Posts: 30

PostPosted: Thu Mar 08, 2007 8:44 pm    Post subject: Reply with quote

hey big,

you been very clear and i appreciate your help.

i've added .xprofile and

export XMODIFIERS=@im=SCIM
export GTK_IM_MODULE="scim"

but it's still not working.
Back to top
View user's profile Send private message
big
n00b
n00b


Joined: 18 Jan 2007
Posts: 69

PostPosted: Fri Mar 09, 2007 1:47 am    Post subject: Reply with quote

It sounds like the configuration file didn't take effect.You can verify it by executing commands after you login :
Code:
$ echo $XMODIFIERS
$ echo $GTK_IM_MODULE

and the output should be:@im=SCIM and scim.
If it does work,i suggest you set LC_CTYPE=zh_CN.UTF-8 and have a try.
BTW,has the method changed something or nothing has changed,so you still have to activate scim manually under gedit and still have no luck under firefox.
Regards!
_________________
be big,no bug
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index 中文 (Chinese) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum