try encoding even if . is not in string
This commit is contained in:
parent
fc9c92b5c1
commit
811606059e
@ -841,9 +841,14 @@ initEncoding(void)
|
||||
} else if ( (enc = setlocale(LC_CTYPE, NULL)) )
|
||||
{ LD->encoding = ENC_ANSI; /* text encoding */
|
||||
|
||||
if ( (enc = strchr(enc, '.')) )
|
||||
/* this does not work on the mac for some reason */
|
||||
if (strchr(enc, '.')) {
|
||||
enc = strchr(enc, '.');
|
||||
/* skip '.' */
|
||||
enc++;
|
||||
}
|
||||
if ( enc )
|
||||
{ const enc_map *m;
|
||||
enc++; /* skip '.' */
|
||||
|
||||
for ( m=map; m->name; m++ )
|
||||
{ if ( strcmp(enc, m->name) == 0 )
|
||||
|
Reference in New Issue
Block a user