Menu

#484 Lame doesn't recognize user locale correctly

Compatibility
closed-accepted
None
5
2017-09-19
2017-09-14
L.K.P.
No

Version: lame-3.99.5

Lame uses the following code sequence in frontend/parse.c to find out the user's character encoding:

char* env_lang = getenv("LANG");
char* xxx_code = env_lang == NULL ? NULL : strrchr(env_lang, '.');
char* cur_code = xxx_code == NULL ? "" : xxx_code+1;

This works for LANG values like "de_DE.iso885915", but several Linux distributions are using "de_DE@euro" instead. The code above doesn't work here. I've attached a patch to parse.c to use nl_langinfo(CODESET) to find the actual character encoding. Maybe somebody can take a look at it.

1 Attachments

Discussion

  • Robert Hegemann

    Robert Hegemann - 2017-09-19
    • status: open --> open-accepted
    • assigned_to: Robert Hegemann
     
  • Robert Hegemann

    Robert Hegemann - 2017-09-19
    • status: open-accepted --> closed-accepted
     
  • Robert Hegemann

    Robert Hegemann - 2017-09-19

    Thanks, will be in version 3.100.

     

Log in to post a comment.