French characters issue

Need help? Post your questions here.

Moderator: moderators

French characters issue

Postby gillespam » Fri Apr 11, 2008 7:31 am

Hello,

First of all, many thanks for this great tool.
Of all the jukebox softwares I've tried, SubSonic is by far the best one - at least for my way of sorting my musical files ^_^

I've got a small issue with French characters : é, à, etc.

I can't see the folders with those characters in their names, and the sorting of the mp3 files is messed out when those characters are in the names.

Folders as seen in SubSonic :
Image
SSH (ls) :
Image
As you can see, 3 folders can't be seen with SubSonic...

Inside a folder with SubSonic :
Image
SSH :
Image

The only topics I've found with the same issue are those :
http://forum.subsonic.org/forum/viewtopic.php?p=1840
http://forum.subsonic.org/forum/viewtopic.php?p=1921
But they weren't useful...

I'm running SubSonic Version 3.4.beta1 (build 525), Server Apache Tomcat/5.5 (72.4 MB / 108.5 MB) on a Debian 4.0 box.
My mp3 files are stored on the server and I have no problem with their filenames (as seen on the screenshots).

Any ideas ?

EDIT :

I've found this post which talk about the same issue :
http://forum.subsonic.org/forum/viewtopic.php?t=689

I've tried to change the encoding from ISO-8859-1 (the one by default) to UTF-8 and to ISO-8859-15 with no succes...

EDIT 2 :

Ok... Now it's getting weird :

I've tried to make a french translation by editing locales.txt and by adding a file named ResourceBundle_fr.properties.

That broke completely Subsonic (java errors everywhere, even by trying to do it the cleanest way -by stoping/restarting tomcat...)

So I choosed to redeploy the .WAR file, and now it's working...

I'll try later to redo a french translation, if you're interested, I'll post it in the forums.

EDIT 3 :

The problem is still here but not all the time...

It seems that the folders/files with accents in their names disappear after a certain amount of time...

If I restart tomcat5.5, it's working again... until next time.
User avatar
gillespam
 
Posts: 17
Joined: Fri Apr 11, 2008 7:05 am

Postby mataka » Tue May 20, 2008 3:33 pm

It seems that this is exactly same problem that I have with finnish characters 'ä' and 'ö' with my ubuntu box.

I have noticed that if I reboot my ubuntu (tomcat service is automatically started during startup of linux) then folders containing those characters are never shown. As soon as I restart tomcat it will work as long as I again reboot linux.

My tomcat version is 5.5.

Have you figured out how to solve this issue?
mataka
 
Posts: 1
Joined: Tue May 20, 2008 3:26 pm

Postby housekat » Sat May 31, 2008 5:13 pm

Seems we've the same problem ... http://forum.subsonic.org/forum/viewtopic.php?t=1159

@gillespam:
.) Where did you change ISO-8859-1? The web.xml in the /tomcat5.5/conf ?
Most xml tags are not set so which one had you changed or added? "fileEncoding" ?
.) restarting tomcat helps but ... sometimes I can see more of my non-latin tracks, sometimes less >.< and I rly have no clue from what it depends ...
.) ResourceBundle_fr.properties ? What is this file for?

Thank you!
housekat
 
Posts: 5
Joined: Fri May 30, 2008 3:26 pm

Postby gillespam » Fri Jun 13, 2008 9:11 am

Oups, sorry guys - haven't had time recently to read this forum as this issue is not a big deal at the moment as I haven't got the time to listen to music those days.

mataka wrote:Have you figured out how to solve this issue?

Nop, sorry.
housekat wrote:.) Where did you change ISO-8859-1? The web.xml in the /tomcat5.5/conf ?
Most xml tags are not set so which one had you changed or added? "fileEncoding" ?

I did what I found in this post :
http://forum.subsonic.org/forum/viewtopic.php?t=689

I changed the default encoding, in the header of tomcat5.5/conf/web.xml :
Code: Select all
<?xml version="1.0" encoding="ISO-8859-15"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">

housekat wrote:.) ResourceBundle_fr.properties ? What is this file for?

Read this ;) :
http://subsonic.sourceforge.net/translate.html
Sindre Mehus wrote:Translating Subsonic

Here's how to translate Subsonic to a new language:

1. Find the two-letter ISO-639 code for your language (a list is available at http://www.loc.gov/standards/iso639-2/englangn.html). For instance, Italian is assigned the code it.

2. Add the ISO-639 code to the file <TOMCAT_HOME>/webapps/subsonic/WEB_INF/classes/net/sourceforge/subsonic/i18n/locales.txt.

3. In the same directory is the file ResourceBundle_en.properties which is the English translation. Use this (or any other file) as the basis for your translation. Better yet, use the latest version from the SVN repository.

4. Create the new resource file, for instance ResourceBundle_it.properties. I recommend saving it outside Tomcat to make sure it's not accidentally deleted.

5. Translate the text in the new file.

6. If you are using a non-Latin alphabet (e.g., Cyrillic or Japanese), you have to convert the property file to ASCII before deploying it in Tomcat. Use the native2ascii tool which is included in the Java Development Kit. For instance, if you're writing a Macedonian translation (using the Cyrillic alphabet) using UTF-16 character encoding, you must convert it as follows:

native2ascii -encoding utf-16 c:\develop\ResourceBundle_mk.properties <TOMCAT_HOME>/webapps/subsonic/WEB_INF/classes/net/sourceforge/subsonic/i18n/ResourceBundle_mk.properties

7. You have to restart Tomcat for the changes to have effect.

8. When you're done, send the new language file to sindre@activeobjects.no
User avatar
gillespam
 
Posts: 17
Joined: Fri Apr 11, 2008 7:05 am

Postby pgawel » Wed Sep 17, 2008 2:28 pm

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).

If the locale isn't set during the jvm startup, the directories containing incorrect characters (not contined in the charset) will get silently discarded by the java standard library (at least the Sun's version).

So for example, if you restart tomcat manually, after the system locale is already set, the directories with foreign characters should be listed normally.


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.
pgawel
 
Posts: 3
Joined: Wed Sep 17, 2008 2:03 pm

Filesystem and tag charset

Postby kim » Wed May 19, 2010 12:25 pm

Would it be possible to have the charset be a configurable setting in Subsonic?

Thanks to this thread, I could fix the problem by adding the following to the init.d script:

export LC_CTYPE
LC_CTYPE=en_US.iso88591

Arguably one could set LANG instead, or LC_COLLATE in addition, depending on how you want the system to behave.
kim
 
Posts: 3
Joined: Wed May 19, 2010 12:06 pm

Check in latest version

Postby jeremyh » Fri May 21, 2010 9:21 pm

Have you checked this in the latest version?
Also, are you getting any errors in the log (which you can see the last part of from the "About Subsonic" page)?
Are the tags in the mp3 valid too? If the tags are goofed it could affect what you see in subsonic (even if the file name is fine).

I checked some albums containing french characters I have from within subsonic 4.0.1 and they seem good:
Image
jeremyh
 
Posts: 49
Joined: Thu Feb 05, 2009 12:01 am
Location: Westminster, Colorado, United States

Re: Check in latest version

Postby SmplyUnprdctble » Tue Jun 29, 2010 12:49 pm

jeremyh wrote:Have you checked this in the latest version?
Also, are you getting any errors in the log (which you can see the last part of from the "About Subsonic" page)?
Are the tags in the mp3 valid too? If the tags are goofed it could affect what you see in subsonic (even if the file name is fine).

I checked some albums containing french characters I have from within subsonic 4.0.1 and they seem good:
Image


I'm running 4.0.1 on Ubuntu and am still getting the problems. What platform are you running it on to be able to display the characters?
SmplyUnprdctble
 
Posts: 21
Joined: Thu Apr 22, 2010 3:33 pm

Postby jeremyh » Tue Jun 29, 2010 1:52 pm

The screenshot was from our server running Ubuntu 10.04 LTS (Lucid Lynx) using 4.0.1 of Subsonic. My desktop where I capture the screenshot was Windows XP using firefox 3.6.4. I think part of it is the browser and part of it is the server which causes the incompatibilities.
jeremyh
 
Posts: 49
Joined: Thu Feb 05, 2009 12:01 am
Location: Westminster, Colorado, United States

Postby SmplyUnprdctble » Tue Jun 29, 2010 2:03 pm

Hrmm.... Maybe I'll try doing a fresh install of Lucid. I upgraded to Lucid from Karmic, and there may be some hanging chads out there from Karmic that might be causing the oddness.

Because I'm running Ubuntu 10.04 with Subsonic 4.0.1 (build 1524) – May 13, 2010 running on jetty-6.1.x, java 1.6.0_20, Linux (22.0 MB / 33.2 MB).

Should also say I'm running Firefox 3.6.6 on XP (and same on Vista) -- both cause the weirdness.
SmplyUnprdctble
 
Posts: 21
Joined: Thu Apr 22, 2010 3:33 pm

Postby jeremyh » Tue Jun 29, 2010 2:08 pm

Well, I think we upgraded our box from a previous ubuntu as well - we have not done a clean install for several versions now. (we have the same version of subsonic too)

The server on the about screen lists Apache Tomcat/6/0.24, java 1.6.0_20. So it could be the difference between jetty and tomcat.
jeremyh
 
Posts: 49
Joined: Thu Feb 05, 2009 12:01 am
Location: Westminster, Colorado, United States

Postby SmplyUnprdctble » Tue Jun 29, 2010 2:44 pm

Hrmm... Maybe -- I used the .deb package that's downloadable from the downloads section instead of dealing with Tomcat.

Any good setup guides on installing the Tomcat and Subsonic on it? (I've never been a fan of a java server anyways... becomes a memory hog)
SmplyUnprdctble
 
Posts: 21
Joined: Thu Apr 22, 2010 3:33 pm

Postby jeremyh » Tue Jun 29, 2010 3:17 pm

I think I set it up with this:
http://www.howtogeek.com/howto/linux/in ... on-ubuntu/
That will configure apache and get it loaded and starting properly on reboot.

We also created a redirect for all port 80 traffic to the subsonic login page. So you just hit the server address in a browser and it throws you to the subsonic login page (we are not serving anything else on the machine).

Deployment is just a matter of throwing the subsonic.war into the tomcat/deploy directory. You can test without the redirect if you just hit http://localhost:8080.

We also loaded the BUM (Boot Up Manager) from synaptic so that we could stop and start tomcat when needed via a GUI. It is like the "services" manager in windows.
jeremyh
 
Posts: 49
Joined: Thu Feb 05, 2009 12:01 am
Location: Westminster, Colorado, United States

Postby SmplyUnprdctble » Tue Jun 29, 2010 3:35 pm

Cool, thanks for the info! I may attempt that when I get home tonight (there's something in 10.04 that causes random reboots to not come up all the way, but there's a lot of speed enhancements that have happened that tells me I don't want to go back).

I'm cool with all the command-line stuff -- but Tomcat is a foreign concept for me mostly, and the few implementations I've seen of it were completely foreign and "not supported for high volume production usage" for some reason.
SmplyUnprdctble
 
Posts: 21
Joined: Thu Apr 22, 2010 3:33 pm

Postby SmplyUnprdctble » Wed Jun 30, 2010 12:05 am

Nice! The Tomcat server works and I have access to all my music! Wonder why the Jetty server doesn't work as well.

Took a bit of work to figure out how to configure Subsonic to be the default app. I just changed the subsonic.war to ROOT.war and it works with my Apache proxy from my router as the Jetty server did.

Now I guess I need to learn more about Tomcat to see what other groovy things I can do! :)
SmplyUnprdctble
 
Posts: 21
Joined: Thu Apr 22, 2010 3:33 pm

Next

Return to Help

Who is online

Users browsing this forum: No registered users and 4 guests