Japanese fonts in gnome-terminal

Hello. I had this working in sarge, but somehow things have changed in
etch, and I can't see Japanese fonts in gnome-terminal. Currently I
have installed packages like cjk-latex, hbf-kanji48, ttf-kochi-mincho,
among the japanese-related packages I can remember. In gnome-terminal,
going to Terminal->Set Character Encoding->Japanese (EUC-JP) does not
work. I have also tried with the current locale (ISO-8859-1), Unicode
(UTF-8) and Japanese (SHIFT-JIS). I have generated the locale
ja_JP.EUC-JP. I also tried adding xfonts-intl-japanese, but it didn't
work.

Sure I'm missing something, but I don't know. Any ideas?

Regards,

Victor

--

0

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Japanese fonts in gnome-terminal

On Mon, 2007-05-07 at 09:38 -0400, Victor Munoz wrote:
> Hello. I had this working in sarge, but somehow things have changed in
> etch, and I can't see Japanese fonts in gnome-terminal. Currently I
> have installed packages like cjk-latex, hbf-kanji48, ttf-kochi-mincho,
> among the japanese-related packages I can remember. In gnome-terminal,
> going to Terminal->Set Character Encoding->Japanese (EUC-JP) does not
> work. I have also tried with the current locale (ISO-8859-1), Unicode
> (UTF-8) and Japanese (SHIFT-JIS). I have generated the locale
> ja_JP.EUC-JP. I also tried adding xfonts-intl-japanese, but it didn't
> work.
>
> Sure I'm missing something, but I don't know. Any ideas?

Hi,

For viewing files in Japanese, or typing Japanese, all you should need
is the appropriate fonts and the correct character encoding. In most
cases, UTF-8 will do fine.

If you want to run apps, or even gnome-terminal, with a Japanese locale,
only then do you need to generate a Japanese locale and set it up to be
used, eg. "LANG=ja_JP.UTF-8 gedit".

From the description you gave above, it sounds like you should have
everything needed to at least display Japanese, so what exactly goes
wrong? Can you for example copy text from the Japanese Wikipedia to
gnome-terminal?

--
Cheers,
Sven Arvidsson
http://www.whiz.se
PGP Key ID 760BDD22

Japanese fonts in gnome-terminal

Sven Arvidsson wrote:
> On Mon, 2007-05-07 at 09:38 -0400, Victor Munoz wrote:
>
>> Hello. I had this working in sarge, but somehow things have changed in
>> etch, and I can't see Japanese fonts in gnome-terminal. Currently I
>> have installed packages like cjk-latex, hbf-kanji48, ttf-kochi-mincho,
>> among the japanese-related packages I can remember. In gnome-terminal,
>> going to Terminal->Set Character Encoding->Japanese (EUC-JP) does not
>> work. I have also tried with the current locale (ISO-8859-1), Unicode
>> (UTF-8) and Japanese (SHIFT-JIS). I have generated the locale
>> ja_JP.EUC-JP. I also tried adding xfonts-intl-japanese, but it didn't
>> work.
>>
>> Sure I'm missing something, but I don't know. Any ideas?
>>

What LANG or LC_CTYPE are you running it with? You generally need to
start applications with either EUC-JP or UTF (The variant of UTF
shouldn't matter, I have Japanese input/display with a British UTF8
locale). Run locale in a terminal and see what happens.

btw; There are some decent Japanese fonts in Debian now too.. ones that
don't make your eyes bleed. I forget the name of them but you should be
able to find them with apt-cache. ^^

--

Japanese fonts in gnome-terminal

On Wed, May 09, 2007 at 09:00:30AM +0200, Daniel Palmer wrote:
> What LANG or LC_CTYPE are you running it with? You generally need to
> start applications with either EUC-JP or UTF (The variant of UTF
> shouldn't matter, I have Japanese input/display with a British UTF8
> locale). Run locale in a terminal and see what happens.

I have nothing of this set except LANG=en_US. However, my problem is
not running the application with Japanese menus or input capabilities
(I can run abiword/gedit/iceweasel in Japanese, with input
capabilities and all), only displaying Japanese text in the terminal.
As I said in other mail in this thread, my problem seems to be
specific to mutt and jed, and possibly other applications. The same
LANG environment and Terminal Character encoding that lets me 'cat' a
Japanese email and see it correctly in gnome-terminal, does not allow
me to read that email in mutt or edit it in jed.

Regards,

Victor

--

Japanese fonts in gnome-terminal

On Tue, May 08, 2007 at 04:34:38PM +0200, Sven Arvidsson wrote:
>
> From the description you gave above, it sounds like you should have
> everything needed to at least display Japanese, so what exactly goes
> wrong? Can you for example copy text from the Japanese Wikipedia to
> gnome-terminal?

Well, your question made me investigate a bit more, and I discovered
that I am indeed able to see Japanese text... sometimes at least.

I copied text from Japanese Wikipedia, and it is copied correctly into
gnome-terminal. I can 'cat' emails in Japanese and I see them. I
alternate between locales ISO-8859-1 and EUC-JP, without problem. What I
*cannot* do is read these emails in mutt/jed (I use jed as the editor
for mutt). I see things like:

^[$B3'MM$+$i$NB??t$N%;%C%7%g%sDs0F$r$*BT$A$$$?$7$F$*$j$^$9!#^[(J

Reading the email as a usual file with jed also fails. I would say the
problem is jed. Except that when I read the folder list with mutt
subjects also come out wrong; or when I simply read the mail, and I
understand jed is not involved here.

So any ideas on how to fix mutt/jed? My problem seems to be
specifically to read mails in Japanese with mutt. I could change the
editor to xemacs, but 1) I'd prefer to stay with jed because it's
faster; 2) problems with reading mail and subject list would not be
solved by changing the editor.

Regards,

Victor

--
Hi! I'm a .signature virus. Copy me into
your ~/.signature to help me spread!

--

Japanese fonts in gnome-terminal

On Wed, 2007-05-09 at 09:56 -0400, Victor Munoz wrote:
> On Tue, May 08, 2007 at 04:34:38PM +0200, Sven Arvidsson wrote:
> >
> > From the description you gave above, it sounds like you should have
> > everything needed to at least display Japanese, so what exactly goes
> > wrong? Can you for example copy text from the Japanese Wikipedia to
> > gnome-terminal?
>
> Well, your question made me investigate a bit more, and I discovered
> that I am indeed able to see Japanese text... sometimes at least.
>
> I copied text from Japanese Wikipedia, and it is copied correctly into
> gnome-terminal. I can 'cat' emails in Japanese and I see them. I
> alternate between locales ISO-8859-1 and EUC-JP, without problem. What I
> *cannot* do is read these emails in mutt/jed (I use jed as the editor
> for mutt). I see things like:
>
> ^[$B3'MM$+$i$NB??t$N%;%C%7%g%sDs0F$r$*BT$A$$$?$7$F$*$j$^$9!#^[(J
>
> Reading the email as a usual file with jed also fails. I would say the
> problem is jed. Except that when I read the folder list with mutt
> subjects also come out wrong; or when I simply read the mail, and I
> understand jed is not involved here.
>
> So any ideas on how to fix mutt/jed? My problem seems to be
> specifically to read mails in Japanese with mutt. I could change the
> editor to xemacs, but 1) I'd prefer to stay with jed because it's
> faster; 2) problems with reading mail and subject list would not be
> solved by changing the editor.

You might want to change to an rxvt that does unicode or kxvt. It
appears that mutt/jed are having a tough time picking up the right
encoding from gnome-terminal. Some old hacks (from 2004) on the
jed-users mailing list show this for jed, fixing russian input and
reading issues.

Sheesh:
http://www.tlug.jp/craigoda/writings/linux-nihongo/node42.html

Long time for this problem to persist. Looks like a kanji enabled rxvt
is the ticket.

You might also want to submit a bug against gnome-terminal for this.
--
greg,
PGP key: 1024D/B524687C 2003-08-05
Fingerprint: E1D3 E3D7 5850 957E FED0 2B3A ED66 6971 B524 687C
Alternate Fingerprint: 09F9 1102 9D74 E35B D841 56C5 6356 88C0

Japanese fonts in gnome-terminal

On Wed, May 09, 2007 at 12:42:47PM -0400, Greg Folkert wrote:
> You might want to change to an rxvt that does unicode or kxvt. It
> appears that mutt/jed are having a tough time picking up the right
> encoding from gnome-terminal. Some old hacks (from 2004) on the
> jed-users mailing list show this for jed, fixing russian input and
> reading issues.
>
> Sheesh:
> http://www.tlug.jp/craigoda/writings/linux-nihongo/node42.html
>
> Long time for this problem to persist. Looks like a kanji enabled rxvt
> is the ticket.
>
> You might also want to submit a bug against gnome-terminal for this.

Thanks for the tips, but I have been unable to make it work. I
installed rxvt-ml, rxvt-unicode-ml, mrxvt-cjk, kterm, and nothing. All
of them are able to show correctlty 'cat'-ted files, for instance, but
none of them works with mutt+Japanese mails. At least in kterm I found
a way to make a pop-up menu appear, so I could change the encoding,
but still no luck. I noticed, in the link you gave, that this guy not
only calls a kanji enabled terminal, but a kanji enabled mutt, which I
could not find in Debian. Calling "mrxvt -km eucj/sjis" doesn't help
either.

All this is very strange of course, as I had this working in sarge,
and I recently tried successfully in Ubuntu, and I never needed
anything else but some fonts, locales, and the usual
mutt/jed/gnome-terminal. But if there's any other suggestion as to how
to make this work in *any* terminal I would be more than grateful :-)

Regards,

Victor

--

Japanese fonts in gnome-terminal

On Wed, May 09, 2007 at 01:44:26PM -0400, Victor Munoz wrote:
> On Wed, May 09, 2007 at 12:42:47PM -0400, Greg Folkert wrote:
> > You might want to change to an rxvt that does unicode or kxvt. It
> > appears that mutt/jed are having a tough time picking up the right
> > encoding from gnome-terminal. Some old hacks (from 2004) on the
> > jed-users mailing list show this for jed, fixing russian input and
> > reading issues.
> >
> > Sheesh:
> > http://www.tlug.jp/craigoda/writings/linux-nihongo/node42.html
> >
> > Long time for this problem to persist. Looks like a kanji enabled rxvt
> > is the ticket.
> >
> > You might also want to submit a bug against gnome-terminal for this.
>
> Thanks for the tips, but I have been unable to make it work. I
> installed rxvt-ml, rxvt-unicode-ml, mrxvt-cjk, kterm, and nothing. All
> of them are able to show correctlty 'cat'-ted files, for instance, but
> none of them works with mutt+Japanese mails. At least in kterm I found
> a way to make a pop-up menu appear, so I could change the encoding,
> but still no luck. I noticed, in the link you gave, that this guy not
> only calls a kanji enabled terminal, but a kanji enabled mutt, which I
> could not find in Debian. Calling "mrxvt -km eucj/sjis" doesn't help
> either.
>
> All this is very strange of course, as I had this working in sarge,
> and I recently tried successfully in Ubuntu, and I never needed
> anything else but some fonts, locales, and the usual
> mutt/jed/gnome-terminal. But if there's any other suggestion as to how
> to make this work in *any* terminal I would be more than grateful :-)

shot in the dark.

there are some 'charset' related items in man muttrc.

A

Japanese fonts in gnome-terminal

On Wed, 2007-05-09 at 13:44 -0400, Victor Munoz wrote:
> On Wed, May 09, 2007 at 12:42:47PM -0400, Greg Folkert wrote:
> > You might also want to submit a bug against gnome-terminal for this.

I would be very surprised if this was an actual bug in gnome-terminal.

> All this is very strange of course, as I had this working in sarge,
> and I recently tried successfully in Ubuntu, and I never needed
> anything else but some fonts, locales, and the usual
> mutt/jed/gnome-terminal. But if there's any other suggestion as to how
> to make this work in *any* terminal I would be more than grateful :-)

I would suggest you separate the two issues, Mutt and Jed, and try to
get each one to work.

Isolate a sample mail, or mbox and see what encoding is used, if it has
an encoding set in the mail, if it matches and so on. A lot of mail is
badly mangled, when I used Mutt I had to play around with charset and
assumed_charset to get some non-usascii characters to show up.

Similar for jed, see if you can view, edit and write Japanese in normal
UTF-8 files before you set it up for Mutt and those mails.

--
Cheers,
Sven Arvidsson
http://www.whiz.se
PGP Key ID 760BDD22

Japanese fonts in gnome-terminal

On Wed, May 09, 2007 at 10:06:34PM +0200, Sven Arvidsson wrote:
> On Wed, 2007-05-09 at 13:44 -0400, Victor Munoz wrote:
> > On Wed, May 09, 2007 at 12:42:47PM -0400, Greg Folkert wrote:
> > > You might also want to submit a bug against gnome-terminal for this.
>
> I would be very surprised if this was an actual bug in gnome-terminal.
>
> > All this is very strange of course, as I had this working in sarge,
> > and I recently tried successfully in Ubuntu, and I never needed
> > anything else but some fonts, locales, and the usual
> > mutt/jed/gnome-terminal. But if there's any other suggestion as to how
> > to make this work in *any* terminal I would be more than grateful :-)
>
> I would suggest you separate the two issues, Mutt and Jed, and try to
> get each one to work.
>
> Isolate a sample mail, or mbox and see what encoding is used, if it has
> an encoding set in the mail, if it matches and so on. A lot of mail is
> badly mangled, when I used Mutt I had to play around with charset and
> assumed_charset to get some non-usascii characters to show up.

You may be onto something. I had a similar (but smaller) problem with a
Danish-speaking yahoo mailing list: A lot of the emails said they had
US-ASCII encoding, but they *really* were iso-8859-1 (yahoo email is
...bad...). End result: The Danish letters 'æøå' and their uppercase
equivalents 'ÆØÅ' showed up as question marks (I hope they display OK in
this mail!)

Since iso8859 is a superset of ascii (I think), adding "charset-hook
US-ASCII iso-8859-1" to my .muttrc solved the problem for me.

Perhaps the same solution will work for you?

--
Karl E. Jorgensen
http://www.jorgensen.org.uk/
http://karl.jorgensen.com
==== Today's fortune:
somebody was calculating pi on the server

Japanese fonts in gnome-terminal

On Thu, May 10, 2007 at 04:51:33PM +0100, Karl E. Jorgensen wrote:
> You may be onto something. I had a similar (but smaller) problem with a
> Danish-speaking yahoo mailing list: A lot of the emails said they had
> US-ASCII encoding, but they *really* were iso-8859-1 (yahoo email is
> ...bad...). End result: The Danish letters 'æøå' and their uppercase
> equivalents 'ÆØÅ' showed up as question marks (I hope they display OK in
> this mail!)
>
> Since iso8859 is a superset of ascii (I think), adding "charset-hook
> US-ASCII iso-8859-1" to my .muttrc solved the problem for me.
>
> Perhaps the same solution will work for you?
>

I have tried some of the charset variables in .muttrc, but nothing.
Some of the mails do declare an encoding (charset="ISO-2022-JP", for
instance, in the folder I am currently playing with), so I guess
playing with "assumed_charset" will not work here. Anyway, setting
other variables like file_charset has not worked. But maybe I should
be playing with gnome-terminal settings simultaneously, and see if
there is some combination of things that works... I don't know.
Anyway, I'll keep experimenting.

Victor

--

Japanese fonts in gnome-terminal

On Wed, 2007-05-09 at 13:44 -0400, Victor Munoz wrote:
> On Wed, May 09, 2007 at 12:42:47PM -0400, Greg Folkert wrote:
> > You might want to change to an rxvt that does unicode or kxvt. It
> > appears that mutt/jed are having a tough time picking up the right
> > encoding from gnome-terminal. Some old hacks (from 2004) on the
> > jed-users mailing list show this for jed, fixing russian input and
> > reading issues.
> >
> > Sheesh:
> > http://www.tlug.jp/craigoda/writings/linux-nihongo/node42.html
> >
> > Long time for this problem to persist. Looks like a kanji enabled rxvt
> > is the ticket.
> >
> > You might also want to submit a bug against gnome-terminal for this.
>
> Thanks for the tips, but I have been unable to make it work. I
> installed rxvt-ml, rxvt-unicode-ml, mrxvt-cjk, kterm, and nothing. All
> of them are able to show correctlty 'cat'-ted files, for instance, but
> none of them works with mutt+Japanese mails. At least in kterm I found
> a way to make a pop-up menu appear, so I could change the encoding,
> but still no luck. I noticed, in the link you gave, that this guy not
> only calls a kanji enabled terminal, but a kanji enabled mutt, which I
> could not find in Debian. Calling "mrxvt -km eucj/sjis" doesn't help
> either.
>
> All this is very strange of course, as I had this working in sarge,
> and I recently tried successfully in Ubuntu, and I never needed
> anything else but some fonts, locales, and the usual
> mutt/jed/gnome-terminal. But if there's any other suggestion as to how
> to make this work in *any* terminal I would be more than grateful :-)

In .muttrc you might try:

set send_charset="us-ascii:iso-8859-1:iso-2022-jp:utf-8"

You can add more.

Let us know.
--
greg,
PGP key: 1024D/B524687C 2003-08-05
Fingerprint: E1D3 E3D7 5850 957E FED0 2B3A ED66 6971 B524 687C
Alternate Fingerprint: 09F9 1102 9D74 E35B D841 56C5 6356 88C0

Japanese fonts in gnome-terminal

On Thu, May 10, 2007 at 12:22:26AM -0400, Greg Folkert wrote:
> In .muttrc you might try:
>
> set send_charset="us-ascii:iso-8859-1:iso-2022-jp:utf-8"
>
> You can add more.
>

I understand this is for outgoing emails, but I don't intend to write
emails in Japanese, just displaying them when receiving. Anyway, I
haven't tried all combinations of "charset" variables in .muttrc.
Maybe some will work. Thanks for the tip. This has been a particularly
annoying problem to solve.

Victor

--

Syndicate content