YAMJ / yamj-v2

Yet Another Movie Jukebox (YAMJ) v2
GNU General Public License v3.0
28 stars 11 forks source link

filename "encoder" doesn't handle ' in filename correctly #2193

Closed Omertron closed 9 years ago

Omertron commented 9 years ago

Original issue 2194 created by Omertron on 2011-11-17T03:39:40.000Z:

it appears ' in filenames is encoded wrong. It finds shows/movies but the filenames it saves do not match whats in the xml..

You can use this tv show for testing as it's complete with all image types so you'll see where it breaks fast.

http://www.thetvdb.com/?tab=series&id=118921&lid=7

Omertron commented 9 years ago

Comment #1 originally posted by Omertron on 2012-02-04T18:35:54.000Z:

The filenames in the xml are encoded with an URL encoder and not the normal unsafe character encoder.

I presume you are talking about the poster fields such as

Luke%20Nguyen%E2%80%99s%20Vietnam%20S01E01.jpg
Omertron commented 9 years ago

Comment #2 originally posted by Omertron on 2012-02-04T20:39:18.000Z:

no this bug isn't just the xml encoded image name.. xml file name, set filename, everything across the board..

Use the Luke Nyugen's example for a test with cleanup you'll see everywhere it's wrong really fast. (yes it was tested on 2923 before replying)

Omertron commented 9 years ago

Comment #3 originally posted by Omertron on 2012-02-05T10:46:19.000Z:

Sorry, I don't get any issues with this show. Used file names "Luke Nguyen’s Vietnam S01E0*.mkv" all videos picked up, videoimages, banners & fanart downloaded and displayed correctly.

Subsequent re-runs deleted no files.

Omertron commented 9 years ago

Comment #4 originally posted by Omertron on 2012-02-05T16:23:56.000Z:

[10:55:24 - Thread-3] ERROR com.moviejukebox.writer.MovieJukeboxXMLWriter - Failed parsing XML (Amsale.Girls.S01E01.Emily���s.Sales.Slump.SD.TV.xml) for movie. Please fix it or remove it. [10:55:25 - Thread-3] ERROR com.moviejukebox.writer.MovieJukeboxXMLWriter - java.io.FileNotFoundException: /c/media/JukeboxFULL/Amsale.Girls.S01E01.Emily���s.Sales.Slump.SD.TV.xml (No such file or directory) [10:57:17 - Thread-4] ERROR com.moviejukebox.writer.MovieJukeboxXMLWriter - Failed parsing XML (Kitchen.Nightmares.S03E01.Hot.Potato.Caf��.HD.TV.xml) for movie. Please fix it or remove it. [10:57:17 - Thread-4] ERROR com.moviejukebox.writer.MovieJukeboxXMLWriter - java.io.FileNotFoundException: /c/media/JukeboxFULL/Kitchen.Nightmares.S03E01.Hot.Potato.Caf��.HD.TV.xml (No such file or directory) [10:57:30 - Thread-4] ERROR com.moviejukebox.writer.MovieJukeboxXMLWriter - Failed parsing XML (Luke.Nguyen���s.Vietnam.S01E01.Saigon.SD.DVD.xml) for movie. Please fix it or remove it. [10:57:30 - Thread-4] ERROR com.moviejukebox.writer.MovieJukeboxXMLWriter - java.io.FileNotFoundException: /c/media/JukeboxFULL/Luke.Nguyen���s.Vietnam.S01E01.Saigon.SD.DVD.xml (No such file or directory) [10:58:54 - Thread-4] ERROR com.moviejukebox.writer.MovieJukeboxXMLWriter - Failed parsing XML (The.Amazing.Race.S14E01.Don���t.Let.a.Cheese.Hit.Me.SD.TV.xml) for movie. Please fix it or remove it. [10:58:54 - Thread-4] ERROR com.moviejukebox.writer.MovieJukeboxXMLWriter - java.io.FileNotFoundException: /c/media/JukeboxFULL/The.Amazing.Race.S14E01.Don���t.Let.a.Cheese.Hit.Me.SD.TV.xml (No such file or directory)

and later in the log, copying the studio icons also has the same result: [11:09:19 - main ] ERROR com.moviejukebox.tools.FileTools - FileTools: The specified /c/addons-config/yamj/full/./skins/eversion/eskins/shared/media/company/Coraz��n International.png file does not exist! [11:09:19 - main ] ERROR com.moviejukebox.tools.FileTools - FileTools: The specified /c/addons-config/yamj/full/./skins/eversion/eskins/shared/media/company/Elz��vir Films.png file does not exist! [11:09:19 - main ] ERROR com.moviejukebox.tools.FileTools - FileTools: The specified /c/addons-config/yamj/full/./skins/eversion/eskins/shared/media/company/Elz����vir Films.png file does not exist! [11:09:19 - main ] ERROR com.moviejukebox.tools.FileTools - FileTools: The specified /c/addons-config/yamj/full/./skins/eversion/eskins/shared/media/company/Elz����vir.png file does not exist! [11:09:19 - main ] ERROR com.moviejukebox.tools.FileTools - FileTools: The specified /c/addons-config/yamj/full/./skins/eversion/eskins/shared/media/company/Eurofilm St��di��.png file does not exist!

Omertron commented 9 years ago

Comment #5 originally posted by Omertron on 2012-02-06T09:19:56.000Z:

I tried to unzip that file on my NAS, but the files are created with "?" instead of the proper unicode characters

Omertron commented 9 years ago

Comment #6 originally posted by Omertron on 2012-05-23T13:01:48.000Z:

Got similuar issue when runing YAMJ scan on my Ubuntu computer. I've solved this by adding this at the begining of script :

export LANG="en_US.UTF-8" ;

Omertron commented 9 years ago

Comment #7 originally posted by Omertron on 2012-11-12T20:27:49.000Z:

web searches show this a known issue in java with a workaround to not need anything special by the user. Apparently you just need to handle the encoding when you read in the filenames from the drive. should be a 1 line fix in yamj

Omertron commented 9 years ago

Comment #8 originally posted by Omertron on 2012-11-12T21:14:44.000Z:

Any idea what the "1 line fix" is?

Omertron commented 9 years ago

Comment #9 originally posted by Omertron on 2012-11-12T22:02:43.000Z:

I know I ran into an example in the past but cant' find it now..

but there is a good explanation of the problem: http://happygiraffe.net/blog/2009/09/24/java-platform-encoding/

you'll not the command line recommendation of -Dsun.jnu.encoding=UTF-8 -Dfile.encoding=UTF-8 to fix it which might be the quick fix that should fix up most or at least the new users who set it up.

Omertron commented 9 years ago

Comment #10 originally posted by Omertron on 2012-11-22T17:12:37.000Z:

I've update the Wiki page http://code.google.com/p/moviejukebox/wiki/Installation in order to describe the localization problem and a possible solution.

For most of the users the export of the locale in the MovieJukebox.sh should be enough.

Omertron commented 9 years ago

Comment #11 originally posted by Omertron on 2012-11-26T11:41:32.000Z:

Already fix.

Take a look at the installation wiki if you have such problems.