perl-unicode

Tk804 + Encode-1.50 :-) again

2002-04-19 12:12:10
Dan Kogai <dankogai(_at_)dan(_dot_)co(_dot_)jp> writes:
I am daydreaming that I am a caravan member, driving a herd of 
disobedient camels on the never-ending desert to an oasis called 5.8.0 
when I released new Encode and PerlIO::encoding.  You can get one as 
follows.

p4 integrated to //depot/perlio for testing.

Without any changes to Tk804 things improved a bit - only the JP.t and KR.t
tests were failing, and those not failing as badly.

Adding ENCODE_FB_QUIET to Tk's encode glue makes those pass as well.

Suggest one small tweak as in attached patch.

The patch turns off utf8_to_uvuni's warning and checks as only 
thing we are using the UV for is an error message (which in my case
isn't going to be printed as I am in FB_QUIET). Otherwise I get noise
when Tk is groping about in U+FFXX "page". 

The "indent" looks better - but has "cuddled else" - no big deal.

I was a little surprised that Encode/encode.h gets installed in lib
rather than archlib/CORE but can live with that (makes a kind of sense
it is architecture neutral - but perl.h et. al. go elsewhere).
The snag here is that Makefile.PL has added -I to find perl.h, so I 
have to 
#include <../../Encode/encode.h> 
which is portability issue as there is no certainty that lib / archlib 
relative paths work like that. Will tweak Tk's Makefile.PL "configure"
to hunt down encode.h. 

Will do a spelling patch on the pod(s) when I get a chance.

-- 
Nick Ing-Simmons
http://www.ni-s.u-net.com/

--- Encode.xs.ship      Fri Apr 19 19:25:26 2002
+++ Encode.xs   Fri Apr 19 19:27:59 2002
@@ -122,7 +122,7 @@
            if (dir == enc->f_utf8) { 
                STRLEN clen;
                UV ch =
-                   utf8n_to_uvuni(s+slen, (SvCUR(src)-slen), &clen, 0);
+                   utf8n_to_uvuni(s+slen, (SvCUR(src)-slen), &clen, 
UTF8_ALLOW_ANY|UTF8_CHECK_ONLY);
                if (check & ENCODE_DIE_ON_ERR) {
                    Perl_croak(
                        aTHX_ "\"\\N{U+%" UVxf "}\" does not map to %s, %d",