This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
On Apr 6 12:21, Corinna Vinschen wrote:
> Hi,
>
> while looking into a problem in the eucJP conversion under Cygwin it
> occured to me that the eucJP character conversion in newlib is incomplete.
> [...]
> Corinna
>
>
> * libc/locale/locale.c (loadlocale): Set mbc_max to 3 for EUCJP.
>
> Index: libc/locale/locale.c
> ===================================================================
> RCS file: /cvs/src/src/newlib/libc/locale/locale.c,v
> retrieving revision 1.17
> diff -u -p -r1.17 locale.c
> --- libc/locale/locale.c 31 Mar 2009 09:31:38 -0000 1.17
> +++ libc/locale/locale.c 5 Apr 2009 20:52:23 -0000
> @@ -468,7 +468,7 @@ loadlocale(struct _reent *p, int categor
> if (!strcmp (charset, "EUCJP") || !strcmp (charset, "eucJP"))
> {
> strcpy (charset, "EUCJP");
> - mbc_max = 2;
> + mbc_max = 3;
> #ifdef _MB_CAPABLE
> l_wctomb = __eucjp_wctomb;
> l_mbtowc = __eucjp_mbtowc;
I checked in this part of the patch already because I need it for the
Cygwin implementation of __eucjp_mbtowc/__eucjp_wctomb to work. Raising
__mb_cur_max by 1 should not adversly effect other implementations.
However, if the new newlib implementation of these functions is rejected,
I'll change locale.c back to define __mb_cur_max to 3 for Cygwin only,
to 2 for all other targets.
Corinna
--
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |