summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2001-03-18 14:18:12 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2001-03-18 14:18:12 +0000
commit1b026014ba0f5424fabe070eda050db5e7df518a (patch)
tree60a3c121ee35a593bb71b0cfe1bf6288be335630 /utf8.c
parentbe4731d2ab91c4f6213bf88a0084f6128a0db383 (diff)
downloadperl-1b026014ba0f5424fabe070eda050db5e7df518a.tar.gz
UTF-X encoding invariance for Encode:
- move Encode::utf8_encode to utf8::encode (likewise decode,upgrade,downgrade,valid) - move the XS code for those to universal.c (so in miniperl) - add utf8::unicode_to_native and its inverse to allow EBCDIC to work in true unicode. - change ext/Encode/compile to use above. - Fix t/lib/encode.t for above - Teach t/lib/b.t to expect -uutf8 - In utf8.c look for SWASHNEW rather than just utf8:: package to see if utf8.pm is needed. p4raw-id: //depot/perlio@9198
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/utf8.c b/utf8.c
index 7ca3cc7bd0..81fb44db35 100644
--- a/utf8.c
+++ b/utf8.c
@@ -1282,8 +1282,9 @@ Perl_swash_init(pTHX_ char* pkg, char* name, SV *listsv, I32 minbits, I32 none)
SV* retval;
SV* tokenbufsv = sv_2mortal(NEWSV(0,0));
dSP;
+ HV *stash = gv_stashpvn(pkg, strlen(pkg), FALSE);
- if (!gv_stashpv(pkg, 0)) { /* demand load utf8 */
+ if (!gv_fetchmeth(stash, "SWASHNEW", 8, -1)) { /* demand load utf8 */
ENTER;
Perl_load_module(aTHX_ PERL_LOADMOD_NOIMPORT, newSVpv(pkg,0), Nullsv);
LEAVE;