Non-ASCII characters garbled in library export?
#1
I tried exporting my library to an xml file and noticed that in the xml some characters were all garbled. For example:

Alejandro González Iñárritu

turns into

Alejandro González Iñárritu

Is this a known limitation or is it expected that the NFO file exactly mirrors the library info?
Reply
#2
Which library?
Reply
#3
Video library.
Reply
#4
It's exported as utf8.

Your nfo files probably aren't utf8.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#5
jmarshall Wrote:It's exported as utf8.

Your nfo files probably aren't utf8.

My NFO files were made straight from the XML that XBMC exported - where are you suggesting the utf8 encoding is lost? I export the XML and when I look at the XML that was exported the special characters are already garbled. I'm pretty sure my text editor supports utf8 since I can copy the real text (like "Alejandro González Iñárritu", for example) to a file and save/open it with no problems with encoding being lost.
Reply
#6
Did you add the utf8 declaration to the top of the xml nfo file?

If not, it'll be read using the string charset.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#7
jmarshall Wrote:Did you add the utf8 declaration to the top of the xml nfo file?

If not, it'll be read using the string charset.

Cheers,
Jonathan

The UTF8 formatting is lost before I ever have any control over the data. When I export my library to videodb.xml and open that file up in a text editor the special characters are already replaced as described above.
Reply
#8
Have you tried opening the XML in something that is actually XML aware, such as a webbrowser? The XML declaration of the encoding means that the text file that contains the XML does not require to have any "utf8 markers" at the start of it or anything.

Perhaps you could upload an example xml file where you think things are going wrong so that others can see what you are seeing?

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#9
OK I exported my library with Atlantis Beta 1 and opened the resulting file in Firefox. The special characters were garbled as before. Here is the file: http://nic.wolfeden.ca/xbmc/videodb.xml

For an example, search for "21 grams" and look at the director's name.

I'm running Windows XP, if it matters.
Reply
#10
Can somebody else try confirming this? Just create a 21 grams file, scrape it, export library, and check the videodb.xml file for the director. Assuming others are getting the same thing I'll log a Trac ticket about it.
Reply
#11
<credits>Guillermo Arriaga</credits>
<director>Alejandro González Iñárritu</director>
<premiered></premiered>

Seems to have worked fine.
Reply
#12
Hmm... what platform did you try it on althekiller?
Reply
#13
Doh! linux of course Smile Too many forums, getting the threads mixed up. Rules out affecting all platforms though :p
Reply
#14
So that we understand the problem completely:

You have nfo files that you previously generated from a video library export, which I presume show correctly for you within the nfo file. Do they also show correctly for you within XBMC? It's only when you export this video library (generated from your nfo files) that you get the garbled characters?

Can you please post your 21 grams nfo file. Does it have the utf8 declaration up the top of it?

Thanks,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#15
I'm sorry I mentioned NFO files, the problem has nothing to do with them. My problem is:

I have a library database created by the IMDB scraper, and the special characters show correctly within XBMC. When I export this library to XML using the XBMC "Export Library" function in the System -> Video -> Library menu, the resulting XML file has garbled special characters. I posted my videodb.xml file above, which contains hundreds of instances of garbled characters. I have been using as an example the director of 21 grams, which you can search for in the posted file.

The NFO confusion is only because I discovered the problem while attempting to use the data from my videodb.xml file to generate NFOs for my current library (so it could be rescanned later without downloading everything from IMDB).
Reply

Logout Mark Read Team Forum Stats Members Help
Non-ASCII characters garbled in library export?0