Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 30 Jan 2017 22:17:37 +0800
From: He X <>
Subject: Re: Re: a bug in bindtextdomain() and strip '.UTF-8'

1. how do we validate if a name is correct? i mean how do we attempt with
zh, zh_CN, zh_CN@xx? using open() to check? what's the fastest and
correctest way?
2. Thx for your help, nsz!

2017-01-30 0:37 GMT+08:00 Rich Felker <>:

> 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

Content of type "text/html" skipped

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.