[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] Feedback: remove LOCALE ifdefs?
From: |
valdis . kletnieks |
Subject: |
Re: [Nmh-workers] Feedback: remove LOCALE ifdefs? |
Date: |
Sun, 27 May 2012 14:04:34 -0400 |
On Sat, 26 May 2012 16:20:33 -0400, Ken Hornstein said:
> >As long as we're looking at that code, we probably want to do an audit to
> >make
> >sure that we aren't using isspace() anyplace to detect rfc822 ascii-ish
> >'whitespace'. I've seen the hilarity that ensues when the mail system at one
> >end thinks that a 'non-breaking space' is whitespace and the system at the
> >other end isn't convinced...
>
> Hm, I see that m_getfld() uses isspace() ... but since that hasn't seem
> to broken just yet I am reluctant to mess with it. Other uses are in
> MIME parsing ... I think that should be okay as long as the locale
> character set is a superset of ASCII. Is that normally the case?
I believe all locales in use are ascii supersets. The problem arises if a
locale defines a non-ascii whitespace char. If I wasn't too busy having a
weekend avoiding C code I'd toss together a quick test to what isspace() says
in various locales about that non-breaking space char at 0xA0.
> That makes me think that we should have an isasciispace() function
> that we should use for things like header and MIME parsing since
> those should always be 7-bit ASCII.
As the world moves further to a multi-charset UTF-8 world, that would
probably be a good idea. But definitely 1.6+ fodder.
pgp0wwprEnlGW.pgp
Description: PGP signature
- [Nmh-workers] Feedback: remove LOCALE ifdefs?, Ken Hornstein, 2012/05/25
- Re: [Nmh-workers] Feedback: remove LOCALE ifdefs?, valdis . kletnieks, 2012/05/26
- Re: [Nmh-workers] Feedback: remove LOCALE ifdefs?, Ken Hornstein, 2012/05/26
- Re: [Nmh-workers] Feedback: remove LOCALE ifdefs?, paul vixie, 2012/05/26
- Re: [Nmh-workers] Feedback: remove LOCALE ifdefs?, Ken Hornstein, 2012/05/26
- Re: [Nmh-workers] Feedback: remove LOCALE ifdefs?, paul vixie, 2012/05/27
- Re: [Nmh-workers] Feedback: remove LOCALE ifdefs?, paul vixie, 2012/05/27
- Re: [Nmh-workers] Feedback: remove LOCALE ifdefs?, Ken Hornstein, 2012/05/30
- Re: [Nmh-workers] Feedback: remove LOCALE ifdefs?,
valdis . kletnieks <=