Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Reading Japanese Filenames in Konqueror (from a samba share)
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
mOjO_420
n00b
n00b


Joined: 11 Jun 2003
Posts: 71
Location: Suburbs of Chicago, IL, USA

PostPosted: Mon Jun 16, 2003 6:38 am    Post subject: Reading Japanese Filenames in Konqueror (from a samba share) Reply with quote

Hi all,
I have been through 6 million guides and searched this forum numerous times and asked in IRC numerous times but all to no avail... :?

heres my situation:
I have a gentoo machine that i'm setting up that will sit in my living room connected to my TV and i will use it to run Mplayer (and MythTV) to watch a variety of divx and mpeg movies and DVDs on the TV, all that is great (and working) except that my wife is japanese and she has a WinXP machine with a 100GB+ of Japanese Movies and TV episodes on it (all with Japanese filenames). So I need to be able to access these files (through samba) from the gentoo machine.

heres what i've done so far:
Installed gentoo-sources from a stage 3 install. Emerged KDE, mplayer, mysql, etc. more imprortantly i have canna, kinput2, kde-i18n-ja, i have snagged several fonts from the winxp machines (arial unicode, and the MS Gothics) and imported them into KDE. I can enable japanese menu support, and should have no problem with the japanese IME, I can view Japanese websites but alas the filenames of the movies still appear as jumbled random characters and not kanji. I have copied one of them to my desktop (in KDE) just to see if the problem wasnt samba but still that filename will not display right.

heres what i'm doing now:
giving up on KDE and Konqueror and installing Gnome to see if theres anyway of getting it working there. I really dont care if i have to use gnome or kde so long as i can meet the following requirements:
1.) be able to play lots of movies in mplayer (including those with japanese filenames!)
2.) run mythtv on it.
3.) have it user-friendly enough for my wife to understand. she is not computer-illiterate but has never touched linux. its gotta be point and click for her.

important details:
the files were originally named on a native Japanese win2k system (no clue what font) and currently reside on a WinXP system (jap locale) which we access through samba via Konqueror. btw.. i have NLS and any and all use flags vaguely relating to foreign language support in my make.conf.

if anyone can help me i would be MOST grateful... might even let ya leech some of my stash :wink:

mOjO
Back to top
View user's profile Send private message
jstubbs
Retired Dev
Retired Dev


Joined: 05 Jul 2003
Posts: 126
Location: Tokyo

PostPosted: Sat Jul 05, 2003 3:07 am    Post subject: Reply with quote

Hey there,

I can't vouch for this as I haven't tried it with samba yet, but I think the following should work. I am dual-booting between Japanese Windows XP and Gentoo and am able to read filenames on the WinXP partition from konsole and konqueror with no problems. I'll try it on Monday, but I think that the settings for ntfs should work for smbfs as well. Here are the relevant config files:

Code:

/etc/env.d/80i18n (taken from Mandrake)

LC_MONETARY=en_US
LC_COLLATE=en_US
LC_NUMERIC=en_US
LC_TIME=en_US
LANG=en_US
LC_MESSAGES=en_US
LC_CTYPE=ja_JP
LANGUAGE=C
LANG=ja_JP
XIM=kinput2
XIM_PROGRAM=kinput2
XMODIFIERS="@im=kinput2"


I'm a native English speaker, so I prefer things to be in English by default. All the references to en_US can be changed to ja_JP. Make sure to run env-update and then logout/login.

Code:

/etc/fstab

/dev/hda2               /               reiserfs        noauto,noatime         1 1
/dev/hda3               /home           reiserfs        noatime                0 0
/dev/hda1               /mnt/windows    ntfs            iocharset=euc-jp,umask=000      0 0
/dev/hda4               none            swap            sw                     0 0
/dev/cdroms/cdrom0      /mnt/cdrom      iso9660         noauto,ro              0 0
none                    /tmp            tmpfs           defaults               0 0
none                    /proc           proc            defaults               0 0
none                    /dev/shm        tmpfs           defaults               0 0


The codepage is listed as "eucjp" in KDE's Local Network Browsing control panel applet, but the kernel source says it's euc-jp. I don't have any separate users in WinXP, so I have everything open; change your umask as necessary.

Code:

/etc/X11/Session/kde-3.1.2 (needed for input)

#!/bin/sh
/usr/X11R6/bin/kinput2 -canna &
/usr/kde/3.1/bin/startkde


This needs to go somewhere before kde is started if you want Japanese input to always be available. I put it here because all the people that use this computer want Japanese input. Actually the stuff that I put in env.d could go here as well; I just like things to be in there place!

So, if you've installed arialuni.ttf properly, you should be able to browse with no problems. If I find it doesn't work when I try on Monday, I'll see if I can figure it out. Good luck!

Jason
Back to top
View user's profile Send private message
mOjO_420
n00b
n00b


Joined: 11 Jun 2003
Posts: 71
Location: Suburbs of Chicago, IL, USA

PostPosted: Sat Jul 05, 2003 7:06 pm    Post subject: Reply with quote

thanks dude... i will try this out when i get back into town sunday night.
gotta get this working before my wife makes me ditch gentoo and go back to XP... hehe... noooooooo... 8O

btw, what mp3 player and other stuff do you use on your bilingual PCs?
Back to top
View user's profile Send private message
jstubbs
Retired Dev
Retired Dev


Joined: 05 Jul 2003
Posts: 126
Location: Tokyo

PostPosted: Sun Jul 06, 2003 5:33 am    Post subject: Reply with quote

I hate Microsoft... I've spent the last four hours trying to get Japanese filenames working only to find out that Microsoft is fscked; of course, I knew that already. Although you can enter Japanese characters in filenames on an English version of WinXP, Windows will corrupt the filenames before they get over the network. I thought everything was meant to be unicode with WindowsXP/2k... I even tried using Samba 3 as it's meant to have (essentially) native unicode support. It seems the networking is still based on DOS/Win3.11 days. Anyway, enough ranting...

After trying to get it working with a nearby English Windows computer, I decided to try a distant Japanese Windows computer and got it working within 5 minutes. Here's the magic command:
Code:
mount -t smbfs -o codepage=cp932,iocharset=euc-jp //<server>/<share> <mount point>

As long as you've set LANG=ja_JP, that should work.

As for Japanese applications, so far I've only installed kde and koffice. Xine and Mplayer are both installed as well and both have mostly iconic buttons and so can be used fairly easily by my girlfriend. Actually, I got a little frustrated with Gentoo and Japanese a while back and tried FreeBSD instead but found it to be too unstable with my NVidia card. Then I switched back to Gentoo to find that the alsa driver for my on-board via8233 no longer worked. From there I tried Vine Linux but found that most of the packages were outdated. Then went on the Mandrake Linux. It's quite good, but the graphical tools didn't do quite everything I wanted and I couldn't be bothered learning where everything goes again so I switched back to Gentoo. Anyway, to my point - Mandrake's default install of kde had Kaboodle playing every type of video file I had. That's the last problem I've got to overcome with my present installation. Once that's working, all major (and some minor) functionality will be available with a Japanese interface on top of it. For the time being, I just changed the default association for all video types to mplayer.

Heheh, I've been trying to convert my woman away from Windows, too. I'm halfway there. She loves the fact that she doesn't have to sit and wait for hotmail and that 95% of the spam she receives is filtered out - gotmail & spamassassin. Other than that all she seems to want is a good tetris - ltris.

Jason
Back to top
View user's profile Send private message
erwan
Apprentice
Apprentice


Joined: 01 Jun 2003
Posts: 150
Location: Tokyo

PostPosted: Sun Jul 06, 2003 2:38 pm    Post subject: Reply with quote

Hi.

I have a similar problem with Nautlilus, in my lab most people use Windows and since I'm in a Japanese university, lot of filenames are in Japanese.

I changed in my kernel config the Samba NLS to Shift_JIS (the default Windows Japanese encoding) and now, at least I can follow the directories by clicking on them. But it is still "mojibake".
_________________
See me on Jabber: erwan@im.loisant.org
Back to top
View user's profile Send private message
jstubbs
Retired Dev
Retired Dev


Joined: 05 Jul 2003
Posts: 126
Location: Tokyo

PostPosted: Mon Jul 07, 2003 12:13 am    Post subject: Reply with quote

Hello erwan,

I'm emerging Nautilus now to confirm this. However, you may have some problems with your setup. The kernel configuration only sets the default codepage to expect from a remote server. Shift-JIS as default NLS should be configured as cp932 or sjis in the kernel - actually, I found out the the codepage= argument accepts sjis as well. Even so, you still have to tell samba how linux wants the filenames. If you've set it, LANG=ja_JP is equivalent of LANG=ja_JP.EUC. Therefore, at a minimum you'd want:
Code:
mount -t smbfs -o iocharset=euc-jp //<server>/<share> <mount point>


If you try that and still have trouble, try unicode by setting LANG=ja_JP.UTF8 and iocharset=utf8. I'll let you know what I find after Nautilus is installed.

Jason
Back to top
View user's profile Send private message
jstubbs
Retired Dev
Retired Dev


Joined: 05 Jul 2003
Posts: 126
Location: Tokyo

PostPosted: Mon Jul 07, 2003 1:35 am    Post subject: Reply with quote

Back again,

Finished emerging Nautilus and have no problems with local NTFS partition or remote SMB share (from a Japanese machine :wink:). Just make sure you've set your locale (ja_JP), codepage (sjis/cp932) and iocharset (euc-jp) and you should be right.

Jason
Back to top
View user's profile Send private message
erwan
Apprentice
Apprentice


Joined: 01 Jun 2003
Posts: 150
Location: Tokyo

PostPosted: Mon Jul 07, 2003 5:03 am    Post subject: Reply with quote

Well, actually the samba share is a linux box (old Japanese RedHat).

My Linux box is configured as French UTF-8, since I'm French ; UTF8 allows me to use Japanese also. (this is also why I use Gnome, KDE is not so good for multilingual).

I noticed that I was not using sjis, but utf8. If I use sjis or euc-jp, names are mojibake and I can not follow directories, and in utf8 still mojibake (with a "invalid unicode" message after each Japanese file names) but I can follow links and manipulate files.
_________________
See me on Jabber: erwan@im.loisant.org
Back to top
View user's profile Send private message
jstubbs
Retired Dev
Retired Dev


Joined: 05 Jul 2003
Posts: 126
Location: Tokyo

PostPosted: Mon Jul 07, 2003 5:22 am    Post subject: Reply with quote

Well then,

I can't really test this, but from what I've read of the documentation, codepage should still be sjis and iocharset should be utf8. Codepage is what samba expects from Windows and iocharset is what linux expects from samba. If it doesn't work then I don't know what's wrong.

BTW, what exactly do I need to do to change my system to unicode? Just change the LC_xxx to <lang>.UTF8 and that's it? I don't have any non-ascii filenames on my linux partitions as yet.

Jason
Back to top
View user's profile Send private message
jstubbs
Retired Dev
Retired Dev


Joined: 05 Jul 2003
Posts: 126
Location: Tokyo

PostPosted: Mon Jul 07, 2003 7:54 am    Post subject: Reply with quote

Okay,

I did test it and your right; it doesn't work. Checking out Samba's site, I found that glibc's implemantation of iconv() is buggy with regard to cp932/sjis. So I tried Samba 3 again and used "-o iocharset=utf8,unicode", but it still didn't work. Strange...

By the way, I've successfully set everything as UTF8 - I used one of your posts on a different thread. So thanks.

Jason
Back to top
View user's profile Send private message
cesar
Tux's lil' helper
Tux's lil' helper


Joined: 15 Aug 2003
Posts: 124

PostPosted: Tue Aug 26, 2003 9:27 am    Post subject: Reply with quote

Hello all:

I know this is a little late to reply to this post but I just found this thread and wanted to ask one thing.

I have no problems at all in KDE (both Mail and Konqueror) reading Japanese, but I just installed mozilla-firebird using emerge and it cannot handle Japanese.

The interesting thing was that I also installed Gentoo in another computer for which I did not compile mozilla-firebird but downloaded the binaries from mozilla.org. That one can handle Japanese with no problems at all. So I guess I need some option for my "USE" flags or something else to correctly build mozilla-firebird and that would probably make evolution (1.4) work as well.

Can you please tell me what I'm missing? I really appreciate your help

Cesar
Back to top
View user's profile Send private message
mOjO_420
n00b
n00b


Joined: 11 Jun 2003
Posts: 71
Location: Suburbs of Chicago, IL, USA

PostPosted: Wed Aug 27, 2003 1:21 am    Post subject: Reply with quote

cesar: not sure.... emerge a program called UFED and use it to make sure you have all the USE flags that reference japanese and chinese characters...

Jason:
i see you got things working between your gentoo box and a japanese windows machine...
did you ever have any luck with that english winXP machine with jap. support? my wifes computer was setup with an english XP cd... i just chose japanese as the default locale for it and installed the japanese IME and a japanese keyboard... would a real japanese copy of XP make a difference?
Back to top
View user's profile Send private message
jstubbs
Retired Dev
Retired Dev


Joined: 05 Jul 2003
Posts: 126
Location: Tokyo

PostPosted: Wed Aug 27, 2003 1:49 am    Post subject: Reply with quote

Cesar: "nls" and "cjk" are the main use flags you need. "nls" is in the default use flags, but you should probably add it to be sure.

Mojo: I'm not sure. In truth, I don't have much need of samba myself. I just liked the challenge of the problem. I would try and test it again, but I've lost the English WinXP box that I was testing with. Sorry!

Jason
Back to top
View user's profile Send private message
cesar
Tux's lil' helper
Tux's lil' helper


Joined: 15 Aug 2003
Posts: 124

PostPosted: Wed Aug 27, 2003 7:59 am    Post subject: Reply with quote

Nop. Nothing worked. I even turned on freewnn and canna servers. My USE flags are as follows

Code:

USE="nls bidi canna cjk firebird freewnn gmtfull gmthigh gmtsuppl gmttria \
     kakasi mozilla mozinterfaceinfo"


... and nothing. Just question marks for Kanji and numbers for the rest of the characters.

This is really frustrating... I wanted it to work to also fix the problem with Evolution, but I guess I'll have to say 'sayonara' to that.

The strange thing is that the binary distribution of firebird has not problems at all. I thought that I could also download and install the binaries from Evolution, but they are only for RPM based systems...
Back to top
View user's profile Send private message
jstubbs
Retired Dev
Retired Dev


Joined: 05 Jul 2003
Posts: 126
Location: Tokyo

PostPosted: Wed Aug 27, 2003 8:13 am    Post subject: Reply with quote

Searched for mozilla-firebird and japanese and only 2 threads; this one and
https://forums.gentoo.org/viewtopic.php?t=64918

Quick search on evolution and japanese showed that gtkhtml doesn't support japanese...
Back to top
View user's profile Send private message
cesar
Tux's lil' helper
Tux's lil' helper


Joined: 15 Aug 2003
Posts: 124

PostPosted: Wed Aug 27, 2003 8:16 am    Post subject: Reply with quote

I was just comparing the binary and my built version and realized that the FONTS are very different.

In the binary distribution, if I go to Tools->Options->Fonts and Colors, these are the defaults for Western

adobe-times-iso8859-1
adobe-helvetica-iso8859-1
adobe-courier-iso8859-1

and for the Japanese

jis-fixed-jisx0208.1983-0
jis-fixed-jisx0208.1983-0
jis-fixed-jisx0208.1983-0

In my build, there is a lot less number of them for the Western and ***NONE*** for Japanese. Could that be the problem? How do I get those fonts (which package???)
Back to top
View user's profile Send private message
cesar
Tux's lil' helper
Tux's lil' helper


Joined: 15 Aug 2003
Posts: 124

PostPosted: Wed Aug 27, 2003 8:20 am    Post subject: Reply with quote

Quote:

Quick search on evolution and japanese showed that gtkhtml doesn't support japanese...


That's strange, when I installed Evolution 1.4 in my former RH distro, I could read Japanese, it was Evolution 1.2 where I could never read anything written in Japanese/Chinese.
Back to top
View user's profile Send private message
cesar
Tux's lil' helper
Tux's lil' helper


Joined: 15 Aug 2003
Posts: 124

PostPosted: Wed Aug 27, 2003 8:40 am    Post subject: Reply with quote

jason.stubbs wrote:
Searched for mozilla-firebird and japanese and only 2 threads; this one and
https://forums.gentoo.org/viewtopic.php?t=64918


GRRRREAT, I did that, downloaded kochi-substitute and re-emerged fontconfig and now it is working. Evolution is also OK. Wow, I'm so happy.

Honto ni, domo arigatou (Thank you so much everyone!)
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