[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Add !HAVE_MBRTOWC fallbacks for mbchar, mbiter and mbuiter
From: |
Eric Blake |
Subject: |
Re: [PATCH] Add !HAVE_MBRTOWC fallbacks for mbchar, mbiter and mbuiter |
Date: |
Fri, 16 Feb 2007 13:24:42 +0000 |
> There are probably two uses of the mbchar, mbfile, mbiter, mbuiter modules:
> (a) Use them only for MB_CUR_MAX > 1, and use simpler datatypes (just
> 'char' and pointers) for MB_CUR_MAX = 1.
> (b) Use them always.
>
Another use of approach a) is bash (which currently does not use
gnulib), but there are things to be aware of. For example, for years,
readline had a bug on cygwin, where MB_CUR_MAX == 1, but
mbslen takes into account non-printing characters while
strlen does not, so an escape character embedded in a string
(common for bash prompts handed to readline) was being
mishandled when the code didn't consistently stick with
approach a) vs. b).
--
Eric Blake
--- Begin Message ---
Subject: |
Re: [PATCH] Add !HAVE_MBRTOWC fallbacks for mbchar, mbiter and mbuiter |
Date: |
Fri, 16 Feb 2007 03:51:06 +0000 |
mb_switched.zip
Description: Zip archive
--- End Message ---
- Re: [PATCH] Add !HAVE_MBRTOWC fallbacks for mbchar, mbiter and mbuiter,
Eric Blake <=