Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LANG must be "C", when running #2

Open
UnitedMarsupials opened this issue Jan 29, 2022 · 4 comments
Open

LANG must be "C", when running #2

UnitedMarsupials opened this issue Jan 29, 2022 · 4 comments

Comments

@UnitedMarsupials
Copy link

Using the tool on FreeBSD-12 to convert tags from CP-1251 to KOI8-U, I found it necessary to set LANG=C before invoking the program.

With my default LANG -- which is uk_UA.KOI8-U here -- I got junk like the below in the tags (printed by mp3info):

Title:   V;5G:> 702820T<>TPUB          Track: 9
Artist:   CA;0=0 F<0=
Album:   1V9<0N #:@0W=CTYER            Year:  2003
Comment:                                Genre:  [255]
@alonbl
Copy link
Owner

alonbl commented Jan 29, 2022

Hi,

This is interesting... the programs always tries to convert to UTF-8 and not to any other format.

Have you used the preserve unicode? Maybe he heuristic is incorrect.

Have you tried the same at Linux? Maybe the iconv has some difference?

Regards,

@UnitedMarsupials
Copy link
Author

Maybe the heuristic is incorrect.

What heuristic? I had to specify each encoding explicitly. The command

mp3unicode -s cp1251 -2 KOI8-U -1 KOI8-U 0*mp3

gave me the above-quoted junk. The below worked fine:

env LANG=C mp3unicode -s cp1251 -2 KOI8-U -1 KOI8-U 0*mp3

Have you tried the same at Linux?

Sorry, I have no Linux anywhere here...

@alonbl
Copy link
Owner

alonbl commented Jan 29, 2022

OK, you did not use --preserve-unicode this means that everything is explicit.

So everythingn is explicit, I am unsure why locale affects this... it must be something with iconv, I am glad you have found a solution.

@UnitedMarsupials
Copy link
Author

So everythingn is explicit, I am unsure why locale affects this...

Would you care try to reproduce yourself -- on Linux? Such as by having your own locale (LANG) set to a non-Unicode encoding, that matches the specified output (-1 and -2)...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants