/* pp_pack.c
*
- * Copyright (c) 1991-2001, Larry Wall
+ * Copyright (c) 1991-2002, Larry Wall
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
if (checksum) {
while (len-- > 0 && s < strend) {
STRLEN alen;
- auint = utf8n_to_uvchr((U8*)s, strend - s, &alen, 0);
+ auint = NATIVE_TO_UNI(utf8n_to_uvchr((U8*)s, strend - s, &alen, 0));
along = alen;
s += along;
if (checksum > bits_in_uv)
EXTEND_MORTAL(len);
while (len-- > 0 && s < strend) {
STRLEN alen;
- auint = utf8n_to_uvchr((U8*)s, strend - s, &alen, 0);
+ auint = NATIVE_TO_UNI(utf8n_to_uvchr((U8*)s, strend - s, &alen, 0));
along = alen;
s += along;
sv = NEWSV(37, 0);
case 'U':
while (len-- > 0) {
fromstr = NEXTFROM;
- auint = SvUV(fromstr);
+ auint = UNI_TO_NATIVE(SvUV(fromstr));
SvGROW(cat, SvCUR(cat) + UTF8_MAXLEN + 1);
SvCUR_set(cat, (char*)uvchr_to_utf8((U8*)SvEND(cat),auint)
- SvPVX(cat));
fromstr = NEXTFROM;
aptr = SvPV(fromstr, fromlen);
SvGROW(cat, fromlen * 4 / 3);
- if (len <= 1)
+ if (len <= 2)
len = 45;
else
len = len / 3 * 3;