summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-01-09 12:47:27 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-01-09 12:47:27 +0000
commit00e86452d0e1986c7a2b65c26ada36d8de6286de (patch)
treefc13033be042f6ce173fd1e9306c92edc985c1d8 /utf8.c
parent31623e47b5a5de87609f69bb07d5757a8d12702f (diff)
downloadperl-00e86452d0e1986c7a2b65c26ada36d8de6286de.tar.gz
In dumping use isPRINT() instead of isprint() so that locale
does not come into play. p4raw-id: //depot/perl@14146
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/utf8.c b/utf8.c
index d979e168d6..01d3ae7a6d 100644
--- a/utf8.c
+++ b/utf8.c
@@ -1665,7 +1665,7 @@ length len, the displayable version being at most pvlim bytes long
(if longer, the rest is truncated and "..." will be appended).
The flags argument can have UNI_DISPLAY_ISPRINT set to display
-isprint()able characters as themselves, UNI_DISPLAY_BACKSLASH
+isPRINT()able characters as themselves, UNI_DISPLAY_BACKSLASH
to display the \\[nrfta\\] as the backslashed versions (like '\n')
(UNI_DISPLAY_BACKSLASH is preferred over UNI_DISPLAY_ISPRINT for \\).
UNI_DISPLAY_QQ (and its alias UNI_DISPLAY_REGEX) have both
@@ -1708,7 +1708,8 @@ Perl_pv_uni_display(pTHX_ SV *dsv, U8 *spv, STRLEN len, STRLEN pvlim, UV flags)
default: break;
}
}
- if (!ok && (flags & UNI_DISPLAY_ISPRINT) && isprint(u & 0xFF)) {
+ /* isPRINT() is the locale-blind version. */
+ if (!ok && (flags & UNI_DISPLAY_ISPRINT) && isPRINT(u & 0xFF)) {
Perl_sv_catpvf(aTHX_ dsv, "%c", u);
ok = TRUE;
}