Problem with charset in mediatomb

Got problems with your B2 or B3? Share and get helped!
Post Reply
Digital P
Posts: 2
Joined: 09 Feb 2009, 19:58

Problem with charset in mediatomb

Post by Digital P » 09 Feb 2009, 20:26

I got the following problem with mediatomb to which I can't find an answer on the internet;

As my MP3 files use characters like à, é etc I wanted to change the charset for mediatomb.

According to the manuals the settings

<filesystem-charset>ISO-8859-1</filesystem-charset>
<metadata-charset>ISO-8859-1</metadata-charset>

in /etc/mediatomb/config.xml should do the trick.

I tried this under the <import> and under the <server> part of the config file. But both seem to be ignored.
My mediatomb reads this config.xml as I can confirm by the test by making an error in this file. In that case there is an error message in the mediatomb.log file in /var/log.

When the system is rebooted the log file reads:

2009-02-10 00:58:11 INFO: Setting filesystem import charset to ANSI_X3.4-1968
2009-02-10 00:58:11 INFO: Setting metadata import charset to ANSI_X3.4-1968
2009-02-10 00:58:11 INFO: Setting playlist charset to ANSI_X3.4-1968

Which is a problem as this charset rejects a lot of MP3 file with the diacritic symbols in it.

After a /etc/init.d/mediatomb restart it reads:

2009-02-10 01:43:54 INFO: Setting filesystem import charset to ISO-8859-15
2009-02-10 01:43:54 INFO: Setting metadata import charset to ISO-8859-15
2009-02-10 01:43:54 INFO: Setting playlist charset to ISO-8859-15

Which is the current locale setting.

Locale output is
LANG=en_US.ISO-8859-15
LC_CTYPE="en_US.ISO-8859-15"
LC_NUMERIC="en_US.ISO-8859-15"
LC_TIME="en_US.ISO-8859-15"
LC_COLLATE="en_US.ISO-8859-15"
LC_MONETARY="en_US.ISO-8859-15"
LC_MESSAGES="en_US.ISO-8859-15"
LC_PAPER="en_US.ISO-8859-15"
LC_NAME="en_US.ISO-8859-15"
LC_ADDRESS="en_US.ISO-8859-15"
LC_TELEPHONE="en_US.ISO-8859-15"
LC_MEASUREMENT="en_US.ISO-8859-15"
LC_IDENTIFICATION="en_US.ISO-8859-15"
LC_ALL=


and locale.gen in /etc/ is:
en_GB.ISO-8859-15 ISO-8859-15
en_GB ISO-8859-1
en_GB.UTF-8 UTF-8
en_US.ISO-8859-15 ISO-8859-15
en_US ISO-8859-1
en_US.UTF-8 UTF-8


So it looks like config.xml doesn't make any difference in the charset used by mediatomb.
It seems that only the current locale at startup matters to mediatomb.

How can I resolve this problem.

Any suggestion would be very appreciated.

Thanks

janneb
Posts: 2
Joined: 11 Feb 2009, 14:28

Post by janneb » 11 Feb 2009, 15:11

I don't know if this helps, but I tried to set the character settings in the config.xml, and after restarting mediatomb, it seems to work. (I just tried filesystem and metadata charset). I added the tags directly after the <import> tag.

Code: Select all

...
</server>
  <import hidden-files="no">
    <filesystem-charset>UTF-8</filesystem-charset>
    <metadata-charset>ISO-8859-1</metadata-charset>
...
Restarting mediatomb, it logs as expected

Code: Select all

2009-02-10 21:46:58 INFO: Setting metadata import charset to ISO-8859-1
2009-02-10 21:46:58 INFO: Setting playlist charset to UTF-8
I have not tired to reboot Bubba2.

Digital P
Posts: 2
Joined: 09 Feb 2009, 19:58

Post by Digital P » 13 Feb 2009, 12:11

Janneb thanks, that did the job, putting the lines in the right place. Even after a reboot it works OK.

Post Reply