develooper Front page | perl.perl5.porters | Postings from June 2003

[perl #22834] Encode::decode with FB_CROAK destructively modifies argument

Thread Next
From:
Roy Badami
Date:
June 27, 2003 06:50
Subject:
[perl #22834] Encode::decode with FB_CROAK destructively modifies argument
Message ID:
rt-22834-59970.12.9051404211619@rt.perl.org
# New Ticket Created by  Roy Badami 
# Please include the string:  [perl #22834]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=22834 >


This is a bug report for perl from roy.badami@globalgraphics.com,
generated with the help of perlbug 1.34 running under perl v5.8.0.


-----------------------------------------------------------------
[Please enter your report here]

Encode::decode with FB_CROAK destructively modifies its argument.  I
suppose it's possible that this is actually a doc bug, and it's
supposed to do this (cf FB_QUIET).

Test case:

use Encode;
$a = "Hello World!";
$b = decode('ISO-8859-1', $a, Encode::FB_CROAK);
print "\$a=$a\n";


[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=library
    severity=medium
---
Site configuration information for perl v5.8.0:

Configured by khalid at Fri Aug 16 14:54:49 BST 2002.

Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
  Platform:
    osname=solaris, osvers=2.5.1, archname=sun4-solaris
    uname='sunos chihuahua 5.5.1 generic_103640-29 sun4u sparc sunw,ultra-1 '
    config_args='-d -Dcc=gcc -Uinstallusrbinperl -Dlibpth=/usr/lib /usr/ccs/lib -Dpager=/usr/ucb/more -Ui_gdbm -Ui_db -Dstartperl=#!/usr/local/bin/perl5 -Dprefix=/usr/local/soft/perl-5.8.0/run/default/sparc_sun_solaris2.5.1 -Dsiteprefix=/usr/local/'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags ='-fno-strict-aliasing -I/usr/local/include ',
    optimize='-O',
    cppflags='-fno-strict-aliasing -I/usr/local/include'
    ccversion='', gccversion='2.95.2 19991024 (release)', gccosandvers='solaris2.5.1'
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=4
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' '
    libpth=/usr/lib /usr/ccs/lib
    libs=-lsocket -lnsl -ldl -lm -lc
    perllibs=-lsocket -lnsl -ldl -lm -lc
    libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags='-fPIC', lddlflags='-G'

Locally applied patches:
    

---
@INC for perl v5.8.0:
    /usr/local/soft/perl-5.8.0/run/default/sparc_sun_solaris2.5.1/lib/5.8.0/sun4-solaris
    /usr/local/soft/perl-5.8.0/run/default/sparc_sun_solaris2.5.1/lib/5.8.0
    /usr/local//lib/site_perl/5.8.0/sun4-solaris
    /usr/local//lib/site_perl/5.8.0
    /usr/local//lib/site_perl
    .

---
Environment for perl v5.8.0:
    HOME=/u/roy
    LANG (unset)
    LANGUAGE (unset)
    LC_COLLATE=en_UK
    LC_CTYPE=en_UK
    LC_MESSAGES=C
    LC_MONETARY=en_UK
    LC_NUMERIC=en_UK
    LC_TIME=en_UK
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=:.:/u/roy/bin:/usr/local/bin:/usr/ucb:/usr/bin/bsd:/bin:/usr/bin:/usr/local/X11R5/bin:/usr/bin/X11:/usr/new:/etc:/usr/etc:/usr/5bin:/usr/local/lib/frame/bin
    PERL_BADLANG (unset)
    SHELL=/usr/local/bin/bash


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About