|
Message-ID: <20170129163714.GM1533@brightrain.aerifal.cx> Date: Sun, 29 Jan 2017 11:37:14 -0500 From: Rich Felker <dalias@...c.org> To: musl@...ts.openwall.com Subject: Re: Re: a bug in bindtextdomain() and strip '.UTF-8' On Sun, Jan 29, 2017 at 10:48:34PM +0800, He X wrote: > btw, with 'p-> to q->', 'strip .UTF-8'(these two in the first thread), and > these two patches, fcitx, chromium are working well. Can I ask how .UTF-8 got in the locale name to begin with? Did you put it there, or was it copied from another non-glibc system you logged in from, or did chromium itself add it? Re: the original patch, it should probably (depending on what we want to do with other invalid encodings) either use strchr to find the first '.' and strip everything after it, or something like: if (loclen > 6 && !strcmp(locname+loclen-6, ".UTF-8")) There's no reason to pull strstr in here. Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.