lordmulder / LameXP

Audio Encoder Front-End
http://lordmulder.github.io/LameXP
Other
184 stars 18 forks source link

French characters were converted to invalid character at cli. #22

Closed Kallontz closed 9 years ago

Kallontz commented 9 years ago

When I tried convert 'Les Misérables' OST, there are some errors due to Franch character(s).

I attached failure log at the bottom of this issue.

As you can see, 'é' was mistranslated into 'e?' in cli.

Please fix it.

Thank you!

LameXP v4.11 (Build #1700), compiled on 2015-04-05 at 18:27:08


(Temp path)/b52587758c950d2f/lxp_lame.exe --nohist -q 0 --cbr -b 128 --tt Epilogue --ta "Amanda Seyfried, Hugh Jackman, Eddie Redmayne, Anne Hathaway, Colm Wilkinson & Les Misérables Cast" --tl "Les Misérables (Highlights From the Motion Picture Soundtrack)" --tg Soundtrack --tn 20 --ti (Temp path)\b52587758c950d2f\bc347e63842bba9a.jpg "(Source path)\20 Amanda Seyfried, Hugh Jackman, Eddie Redmayne, Anne Hathaway, Colm Wilkinson & Les Misérables Cast - Epilogue.mp3" "(Target path)\20 Amanda Seyfried, Hugh Jackman, Eddie Redmayne, Anne Hathaway, Colm Wilkinson & Les Misérables Cast - Epilogue.mp3"

Could not find "(Target path)\20 Amanda Seyfried, Hugh Jackman, Eddie Redmayne, Anne Hathaway, Colm Wilkinson & Les Mise?rables Cast - Epilogue.mp3". Can't init infile '(Target path)\20 Amanda Seyfried, Hugh Jackman, Eddie Redmayne, Anne Hathaway, Colm Wilkinson & Les Mise?rables Cast - Epilogue.mp3'

Exited with code: 0xFFFFFFFF

lordmulder commented 9 years ago

Hi, Kallontz.

LameXP is fully Unicode aware. So is the LAME command-line encoder. As you can see, the French é is not a problem at all. It even works fine with Cyrillic, Japanese and Greek symbols in the path name:

les miserables 2

And don't let yourself be confused by the fact that the status messages, which LAME writes to the console, may appear garbled sometimes. Internally, LAME uses UTF-8 strings all the way. But, apparently, LAME writes to the stdout in "text" mode. And, for the Microsoft CRT, "text" mode implies ANSI Codepage – which is going to mess up the UTF-8 strings. You have to set stdout to _O_U8TEXT or _O_BINARY mode to make sure that UTF-8 strings get passed trough the CRT unmodified.


Anyway, this is not a big deal! What really matters is that the command-line, which LameXP is passing to LAME, has the proper Unicode path. And, as far as I can tell, this _is_ the case here:

lxp_lame.exe [...] "(Source path)\20 Amanda Seyfried, Hugh Jackman, Eddie Redmayne, Anne Hathaway, Colm Wilkinson & Les Misérables Cast - Epilogue.mp3" "(Target path)\20 Amanda Seyfried, Hugh Jackman, Eddie Redmayne, Anne Hathaway, Colm Wilkinson & Les Misérables Cast - Epilogue.mp3"

So, this is probably a different problem, e.g. the file has been moved to a different location and thus cannot be found now. In any case, if you still have problem, I need more detailed info to reproduce...

Regards, MuldeR

lordmulder commented 9 years ago

No more information has been provided, so I'm going to assume this was resolved.