Hainzy262 / comictagger

Automatically exported from code.google.com/p/comictagger
0 stars 0 forks source link

Error when using non-ascii characters on command line #70

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What version of ComicTagger are you using?

On what operating system (Mac, Linux, Windows)? What version?
OS X 10.10.2

GUI or command line?
Command Line

What steps will reproduce the problem?
1.Try to save tags from command line with non-unicode characters. Example:
./ComicTagger -s -t CR -m "publisher=Planeta DeAgostini,language=es,series=Los 
4 Fantásticos" -R directory

What is the expected output? What do you see instead?
Should save the data, instead an exception is thrown:
Traceback (most recent call last):
  File "<string>", line 5, in <module>
  File "/Users/tony/Dropbox/tagger/comictagger/mac/build/ComicTagger/out00-PYZ.pyz/comictaggerlib.main", line 66, in ctmain
  File "/Users/tony/Dropbox/tagger/comictagger/mac/build/ComicTagger/out00-PYZ.pyz/comictaggerlib.cli", line 186, in cli_mode
  File "/Users/tony/Dropbox/tagger/comictagger/mac/build/ComicTagger/out00-PYZ.pyz/comictaggerlib.cli", line 437, in process_file_cli
  File "/Users/tony/Dropbox/tagger/comictagger/mac/build/ComicTagger/out00-PYZ.pyz/comictaggerlib.cli", line 83, in actual_metadata_save
  File "/Users/tony/Dropbox/tagger/comictagger/mac/build/ComicTagger/out00-PYZ.pyz/comictaggerlib.comicarchive", line 640, in writeMetadata
  File "/Users/tony/Dropbox/tagger/comictagger/mac/build/ComicTagger/out00-PYZ.pyz/comictaggerlib.comicarchive", line 865, in writeCIX
  File "/Users/tony/Dropbox/tagger/comictagger/mac/build/ComicTagger/out00-PYZ.pyz/comictaggerlib.comicinfoxml", line 59, in stringFromMetadata
  File "/Users/tony/Dropbox/tagger/comictagger/mac/build/ComicTagger/out00-PYZ.pyz/comictaggerlib.comicinfoxml", line 93, in convertMetadataToXML
  File "/Users/tony/Dropbox/tagger/comictagger/mac/build/ComicTagger/out00-PYZ.pyz/comictaggerlib.comicinfoxml", line 90, in assign
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 10: 
ordinal not in range(128)

Please provide any additional information below.
The problem does not happen when using the GUI. Tried to use the data as is 
stored in the XML or with \ before the "á" char, but didn't work as expected.

Original issue reported on code.google.com by kou...@gmail.com on 14 Feb 2015 at 5:54

GoogleCodeExporter commented 8 years ago
Check your locale configuration (eg: LC_* environment variables, at least in 
most unix like platforms) in the CLI, it's probably not UTF8.

Original comment by davide.r...@gmail.com on 3 Mar 2015 at 8:55

GoogleCodeExporter commented 8 years ago
Checked, and not the case:

$ locale
LANG="es_ES.UTF-8"
LC_COLLATE="es_ES.UTF-8"
LC_CTYPE="es_ES.UTF-8"
LC_MESSAGES="es_ES.UTF-8"
LC_MONETARY="es_ES.UTF-8"
LC_NUMERIC="es_ES.UTF-8"
LC_TIME="es_ES.UTF-8"
LC_ALL=

Original comment by kou...@gmail.com on 3 Mar 2015 at 7:35