Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
can't read chinese email-alpine[SOLVED]
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
upengan78
l33t
l33t


Joined: 27 Jun 2007
Posts: 711
Location: IL

PostPosted: Mon Oct 31, 2011 3:59 pm    Post subject: can't read chinese email-alpine[SOLVED] Reply with quote

Hi,

Everything works in my alpine on gentoo(amd64) but the chinese language emails. When I open alpine and go into INBOX, I see ????? for that chinese email and when I open that email I see below text. I open alpine inside X using 'Xfce Terminal Emulator'

Subject: ????????


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


???????????????????????????????????A
??????????
??????????????????????????????????????????????????????L
?????
- --



Why can't I see this email in Chinese characters? Is it problem with alpine or Gentoo fonts?

I haven't set LANG env variable in my shell profile but the Display character language in alpine is set to UTF-8.

Rest of the emails in English work fine.

Any help is appreciated. Thanks.


Last edited by upengan78 on Tue Nov 01, 2011 3:14 pm; edited 1 time in total
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 6196

PostPosted: Tue Nov 01, 2011 3:02 am    Post subject: Reply with quote

TBH, the above tells very little.

Far more useful would be i.e. part of the file from the maildir - at least the header and a line or two of the content.
Back to top
View user's profile Send private message
ppurka
Advocate
Advocate


Joined: 26 Dec 2004
Posts: 3256

PostPosted: Tue Nov 01, 2011 5:08 am    Post subject: Reply with quote

VoidMage wrote:
TBH, the above tells very little.

Far more useful would be i.e. part of the file from the maildir - at least the header and a line or two of the content.
What the OP means is that the OP sees only ? instead of chinese characters. I suspect what the OP is missing is either console fonts for chinese, or the terminal does not support displaying chinese characters, or both.

@upengan78: try urxvt (probably with wide-character support included?) - maybe it will work if you have the fonts installed. Don't ask me what fonts you need; I don't know! There is also a Chinese subforum. You might get better advice there.
_________________
emerge --quiet redefined | E17 vids: I, II | Now using kde5 | e is unstable :-/
Back to top
View user's profile Send private message
upengan78
l33t
l33t


Joined: 27 Jun 2007
Posts: 711
Location: IL

PostPosted: Tue Nov 01, 2011 2:38 pm    Post subject: Reply with quote

Thanks for replying.

I don't know if header is still going to be useful but if so, I will post it later.

I asked the same question to developer of Alpine and reply was,

Code:

In order for UTF-* to work several things must happen.

 - Set the enviroment to UTF-8, eg. "setenv LANG en_US.UTF-8" for english.
   Do the appropriate one for Chineese. <--------------------------------------------I wonder why I have to change LANG to Chinese, I thought Unicode should take care of this automatically with the use of UTF-8 and LANG=en_US.UTF-8 need not be changed

 - Set the screen to display UTF-8.

 - set Alpine character set variable to UTF-8. According to what you told
   me you already configured this.


I am using XFCE terminal emulator and bash, so I did
export LANG=en_US.UTF-8

I don't know how to do screen to display UTF-8 -> would it mean I have to change locale or use urxvt which is capable of handling UTF-8?

Last thing asked above to set alpine character set has already been done and set to UTF-8.

My current locale is
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 I set LANG, locale variables change,
Code:
export LANG=en_US.UTF-8


Code:
#locale
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=



Actual email content is
Code:
Date: Mon, 31 Oct 2011 08:56:14 -0500
From:
To:
Subject: 理工学院的校友和


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


理工学院的校友和摄政王,前董事会董事会椅子,和大学的伟大的朋友,罗伯特A
·普利兹克,已过世。
“鲍勃是一个平凡的男人和个人所得税的最热心和善意的支持者之一,他的名字是与个人所得税的代名词,说:”总统约翰L
·安德森。




alpine shows

Code:
Subject: ����������������������


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


���������������������������������������������������������������������������������������������������A
�����������������������������
����������������������������������������������������������������������������������������������������������������������������������������������������������L
��������������



If I use urxvt on XFCE terminal, I can see below from Alpine

Code:
Subject: 理工学院的校友和


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


理工学院的校友和摄政王,前董事会董事会椅子,和大学的伟大的朋友,罗伯特A
·普利兹克,已过世。
“鲍勃是一个平凡的男人和个人所得税的最热心和善意的支持者之一,他的名字是与个
人所得税的代名词,说:”总统约翰L
·安德森。
- --
Back to top
View user's profile Send private message
upengan78
l33t
l33t


Joined: 27 Jun 2007
Posts: 711
Location: IL

PostPosted: Tue Nov 01, 2011 3:14 pm    Post subject: Reply with quote

Got it to work in Xfce - terminal.

How? : Well going back to basics and reading :D

Followed sections at http://www.gentoo.org/doc/en/guide-localization.xml from 3.1 till 3.5, ran startx and opened an X terminal(XFCE-terminal) and alpine.

I can see characters fine and no need to change LANG to chinese for this to work.

sudo cat /etc/env.d/02locale
Code:
LANG="en_US.UTF-8"
LC_COLLATE="C"
LC_CTYPE=en_US.UTF-8


locale
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=C
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=



Alpine > INBOX >
Code:
....

 43 Yesterday  To: upendra@blah  (3K) Fw: 理工学院的校友和     


Open the email.

Code:

Subject: 理工学院的校友和


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


理工学院的校友和摄政王,前董事会董事会椅子,和大学的伟大的朋友,罗伯特A
·普利兹克,已过世。
“鲍勃是一个平凡的男人和个人所得税的最热心和善意的支持者之一,他的名字是与个
人所得税的代名词,说:”总统约翰L
·安德森。



Chinese fonts were installed earlier , here is what was enabled.

eselect fontconfig list
Code:
Available fontconfig .conf files  ( * is enabled ):
  [1]   10-autohint.conf
  [2]   10-no-sub-pixel.conf
  [3]   10-sub-pixel-bgr.conf
  [4]   10-sub-pixel-rgb.conf
  [5]   10-sub-pixel-vbgr.conf
  [6]   10-sub-pixel-vrgb.conf
  [7]   10-unhinted.conf
  [8]   20-fix-globaladvance.conf *
  [9]   20-unhint-small-dejavu-sans-mono.conf
  [10]  20-unhint-small-dejavu-sans.conf
  [11]  20-unhint-small-dejavu-serif.conf
  [12]  20-unhint-small-vera.conf *
  [13]  25-ttf-arphic-ukai-render.conf *
  [14]  25-ttf-arphic-uming-bitmaps.conf *
  [15]  25-ttf-arphic-uming-render.conf *
  [16]  25-unhint-nonlatin.conf
  [17]  30-metric-aliases.conf *
  [18]  30-urw-aliases.conf *
  [19]  35-ttf-arphic-ukai-aliases.conf *
  [20]  35-ttf-arphic-uming-aliases.conf *
  [21]  40-nonlatin.conf *
  [22]  41-ttf-arphic-ukai.conf *
  [23]  41-ttf-arphic-uming.conf *
  [24]  42-luxi-mono.conf *
  [25]  44-wqy-zenhei.conf *
  [26]  45-latin.conf *
  [27]  49-sansserif.conf *
  [28]  50-user.conf *
  [29]  51-local.conf *
  [30]  57-dejavu-sans-mono.conf
  [31]  57-dejavu-sans.conf
  [32]  57-dejavu-serif.conf
  [33]  60-latin.conf *
  [34]  64-ttf-arphic-uming.conf *
  [35]  65-fonts-persian.conf *
  [36]  65-khmer.conf
  [37]  65-nonlatin.conf *
  [38]  66-wqy-zenhei-sharp-no13px.conf *
  [39]  66-wqy-zenhei-sharp.conf *
  [40]  69-unifont.conf *
  [41]  70-no-bitmaps.conf *
  [42]  70-yes-bitmaps.conf
  [43]  75-ttf-arphic-ukai-select.conf *
  [44]  80-delicious.conf *
  [45]  90-synthetic.conf *
  [46]  90-ttf-arphic-ukai-embolden.conf *
  [47]  90-ttf-arphic-uming-embolden.conf *
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments 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