French characters issue

Need help? Post your questions here.

Moderator: moderators

[resolved]

Postby geka » Tue Feb 08, 2011 8:21 pm

pgawel wrote:I've solved a similar problem on my Linux box.

Your system locale/charset needs to be set correctly to an existing locale/charset (you may need to generate a correct locale) and the filesystem must use the same encoding for filenames. And the most important thing: the locale must be *already set* when tomcat (or another application server) starts during system bootup (which wasn't the case with my system's default boot process).

...

The bottom line is: I set the LANG=en_US.UTF-8 and LC_COLLATE=C environment variables during tomcat startup, and now it all works fine for me.


Merci for the tips.
It works fine.

To correct the language settings :
$ sudo nano /etc/default/locale
Exemple :
Code: Select all
#  File generated by update-locale
LANG=fr_FR.UTF-8
LC_COLLATE=C

Then force locales update with :
$ sudo dpkg-reconfigure locales

restart the subsonic service with :
$ sudo service subsonic restart
geka
 
Posts: 1
Joined: Tue Feb 08, 2011 8:15 pm

Postby teratomata » Sat Feb 26, 2011 8:07 pm

Just to be perfectly clear on how to do this, and so I know where to look next time I install a system, here is how to get special character working on linux systems.

First you need to make sure your local is set up, which it should be, use the command locale in a terminal. You should get something like this:
Code: Select all
LANG=en_US.utf8
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE="en_US.utf8"
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT="en_US.utf8"
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=

The en and US parts might be different and that is fine. Now you need to add that to subsonic by adding the following command:
Code: Select all
export $(locale | grep LANG)

Add that to the second line of the following files. I'm not actually sure which ones need it and it depends on whether you start subsonic manually, automatically, or as a daemon, however it doesn't hurt to add it to all of them:
Code: Select all
For Ubuntu:
/usr/bin/subsonic
/etc/default/subsonic
/etc/init.d/subsonic

For Arch Linux:
/usr/bin/subsonic
/var/subsonic/subsonic.sh
/etc/rc.d/subsonic


Restart subsonic, the best way being:
Code: Select all
Ubuntu:
/etc/init.d/subsonic restart
Arch:
/etc/rc.d/subsonic restart


Finally, go to subsonic, go to your settings, and readd your music folders. You should just be able to click save. You should now see all folders and files with special characters. Note that a lot of these actions require root privileges so preface them with sudo.

Finally, if this works if you run /usr/bin/subsonic but not as a daemon then the daemon starter is changing your LANG setting. A quick fix is add the following lines to /etc/rc.d(init.d)/subsonic:
Code: Select all
export $(locale | grep LANG)
SLANG=$LANG

Then you'll see the following:
Code: Select all
. /etc/rc.conf
      get_pid
      echo "Done. PID=$PID"
. /etc/rc.d/functions

case "$1" in
  start)


Add the following line to read as such:
Code: Select all
. /etc/rc.conf
      get_pid
      echo "Done. PID=$PID"
. /etc/rc.d/functions

export LANG=$SLANG

case "$1" in
  start)

Again go to settings>music folders and click save to reset them, You should now see the folders with files in them.
teratomata
 
Posts: 2
Joined: Sat Feb 26, 2011 7:54 pm

Previous

Return to Help

Who is online

Users browsing this forum: No registered users and 12 guests