Questionable code behavior in u32cconv?

2012-02-18 Thread John Kearney
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' - -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' - -DCONF_VE

Re: UTF-8 Encode problems with \u \U

2012-02-18 Thread Andreas Schwab
John Kearney writes: > How can doing a direct assignment, in less cases break anything, Where did I say that? > And it does work for me, so impossible seems to be overstating it. How is it possible to affect UTF-8 while not affecting UTF-8? Andreas. -- Andreas Schwab, sch...@linux-m68k.org

Fix u32toutf8 so it encodes values > 0xFFFF correctly.

2012-02-18 Thread John Kearney
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' - -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' - -DCONF_VE

Re: UTF-8 Encode problems with \u \U

2012-02-18 Thread John Kearney
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/18/2012 11:29 AM, Andreas Schwab wrote: > John Kearney writes: > >> what I suggest will fix the UTF-8 case > > No, it won't. > >> and not affect the UTF-2 case. > > That is impossible. > > Andreas. > Current code if (uvalue <= UCH

Re: UTF-8 Encode problems with \u \U

2012-02-18 Thread Andreas Schwab
John Kearney writes: > what I suggest will fix the UTF-8 case No, it won't. > and not affect the UTF-2 case. That is impossible. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely diffe

Re: UTF-8 Encode problems with \u \U

2012-02-18 Thread John Kearney
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I know To be hones I get a bad feeling with that code, I'm guessing it was done for performance reasons, Personally I'd just remove the special handling of any values, and always call the encoding function, but was trying for a minimalist solution. I m

Re: UTF-8 Encode problems with \u \U

2012-02-18 Thread Andreas Schwab
John Kearney writes: > Fix: > iff --git a/builtins/printf.def b/builtins/printf.def > index 9eca215..b155160 100644 > --- a/builtins/printf.def > +++ b/builtins/printf.def > @@ -859,7 +859,7 @@ tescape (estart, cp, lenp, sawc) > *cp = '\\'; > return 0; >} > -if (uval

UTF-8 Encode problems with \u \U

2012-02-18 Thread John Kearney
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE