LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 01-02-2009, 06:38 PM   #1
Dankles
Member
 
Registered: May 2004
Location: /dev/null
Distribution: Slackware
Posts: 245

Rep: Reputation: 31
Japanese chars in File Names


Is there a way to show japanese characters of my files in the console and my file manager?
Dunno if this is relevent but here some of my language settings:
Code:
LANG=en_US
LC_COLLATE=C
Do I need unicode? Japanese Fonts will work in Firefox and other apps(besides my file manager=pcmanfm)

Last edited by Dankles; 01-02-2009 at 06:44 PM.
 
Old 01-02-2009, 07:33 PM   #2
David the H.
Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 5,338

Rep: Reputation: 1202Reputation: 1202Reputation: 1202Reputation: 1202Reputation: 1202Reputation: 1202Reputation: 1202Reputation: 1202Reputation: 1202
Yes, you generally need to use UTF-8, or at least a Japanese encoding. But if you require any kind of international language support, then unicode is the way to go, because it can handle all characters. It's the wave of the future. I started on Linux before unicode support was complete, and Japanese support was a b***, let me tell you.

But let me also advise you from personal experience that it's easier if you just use alphanumeric characters in filenames. Things like file globbing and sorting are much more complicated with Japanese, and I still haven't figured out how to do Japanese input on a non-gui terminal yet. I always simply romanize my Japanese filenames now.

This is the best page I've found concerning international text support. It's debian-focused, but most of the info is distro-agnostic.

Web page displays depend only on the browser's rendering engine and font availability. They have nothing to do with the system encoding.
 
Old 01-02-2009, 07:53 PM   #3
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 4,035

Rep: Reputation: Disabled
Enabling UTF-8 locale is only part of what you need to do. It will enable you to display Japanese text in your console and in X terminals. If that is all you need, editing /etc/profile.d/lang.sh and enabling a UTF-8 locale is enough. But in order to input Japanese text you need to do a little more.

You will find the following piece of text in the CHANGES_AND_HINTS.TXT file of Slackware 12.1 ... unfortunately it was deleted from the 12.2 version:

Code:
Input methods for complex characters (CJK, which is shorthand for Chinese,
  Japanese, Korean) and other non-latin character sets have been added. These
  input methods use the SCIM (Smart Common Input Method) platform.
  The environment variables for SCIM support are set in /etc/profile.d/scim.sh
  The requirements for getting SCIM input methods to work in your X session
  are as follows:
  (1) Use a UTF-8 locale. Look in /etc/profile.d/lang.sh for setting your
      language to (for instance) en_US.UTF-8. As a word of warning: maybe you
      should leave root with a non-UTF-8 locale because you don't want root's
      commands to be misinterpreted. You can add the following line to your
      ~/.profile file to enable UTF-8 just for yourself:
        export LANG=en_US.UTF-8
  (2) Make the scim profile scripts executable. These will setup your
      environment correctly for the use of scim with X applications. Run:
        chmod +x /etc/profile.d/scim.*
  (3) Start the scim daemon as soon as your X session starts. The scim daemon
      must be active before any of your X applications. In KDE, you can add a
      shell script to the ~/.kde/Autostart folder that runs the command
      "scim -d". In XFCE you can add "scim -d" to the Autostarted Applications.
      If you boot your computer in runlevel 4 (the graphical XDM/KDM login)
      you can simply add the line "scim -d" to your ~/.xprofile file.
      This gives you a Desktop Environment independent way of starting scim.
  When scim is running, you will see a small keyboard icon in your system tray.
  Right-click it to enter SCIM Setup. In 'Global Setup' select your keyboard
  layout, and you are ready to start entering just about any language
  characters you wish! Press the magical key combo <Control><Space>
  in order to activate or deactivate SCIM input. The SCIM taskbar in the
  desktop's corner allows you to select a language. As you type, SCIM will show
  an overview of applicable character glyphs (if you are inputting complex
  characters like Japanese).
Hope this helps.

Eric
 
Old 01-02-2009, 08:33 PM   #4
Dankles
Member
 
Registered: May 2004
Location: /dev/null
Distribution: Slackware
Posts: 245

Original Poster
Rep: Reputation: 31
Thanks for the help guys! Much appreciated!
 
Old 03-24-2009, 06:48 AM   #5
IsaoHK
LQ Newbie
 
Registered: Mar 2009
Posts: 5

Rep: Reputation: 0
Thanks. But there is no ~/.xprofile in my configuration ??
 
Old 03-24-2009, 06:53 AM   #6
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 4,035

Rep: Reputation: Disabled
Quote:
Originally Posted by IsaoHK View Post
Thanks. But there is no ~/.xprofile in my configuration ??
You have to create that file yourself....

Eric
 
  


Reply

Tags
japanese, linux


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
bash: how to replace strings of a file with some " chars ? frenchn00b Linux - General 1 03-01-2008 09:10 AM
Need to find if a matching file exist from a list of possible file names wit_273 Linux - General 5 10-25-2007 09:47 AM
Bash scripting. Strip chars from file names, etc. mooreted Programming 7 02-11-2007 08:52 PM
HowTo: special chars (ŰűŐő) in file names ceetrom Linux - Newbie 1 11-03-2006 12:53 PM
German umlaute (special chars) in file system steltner Linux - General 5 10-27-2003 02:07 PM


All times are GMT -5. The time now is 03:24 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration