summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2002-01-25 11:01:49 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2002-01-25 11:01:49 +0000
commiteb1102fcca2230364ceadea29bd8e87ee51b15fa (patch)
treebbe40957b80489b669b86133adb740b5d811cf73 /sv.c
parent3ed9f8f7de3dfc6ca29c4acc02b797c9dd51d971 (diff)
downloadperl-eb1102fcca2230364ceadea29bd8e87ee51b15fa.tar.gz
Integrate mainline
All but ../lib/Unicode/UCD.t pass. p4raw-id: //depot/perlio@14412
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/sv.c b/sv.c
index 89633b5de9..8f5b0a6172 100644
--- a/sv.c
+++ b/sv.c
@@ -1,6 +1,6 @@
/* sv.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.
@@ -3372,28 +3372,6 @@ Perl_sv_utf8_downgrade(pTHX_ register SV* sv, bool fail_ok)
if (!utf8_to_bytes(s, &len)) {
if (fail_ok)
return FALSE;
-#ifdef USE_BYTES_DOWNGRADES
- else if (IN_BYTES) {
- U8 *d = s;
- U8 *e = (U8 *) SvEND(sv);
- int first = 1;
- while (s < e) {
- UV ch = utf8n_to_uvchr(s,(e-s),&len,0);
- if (first && ch > 255) {
- if (PL_op)
- Perl_warner(aTHX_ WARN_UTF8, "Wide character in byte %s",
- OP_DESC(PL_op);
- else
- Perl_warner(aTHX_ WARN_UTF8, "Wide character in byte");
- first = 0;
- }
- *d++ = ch;
- s += len;
- }
- *d = '\0';
- len = (d - (U8 *) SvPVX(sv));
- }
-#endif
else {
if (PL_op)
Perl_croak(aTHX_ "Wide character in %s",