develooper Front page | perl.perl5.porters | Postings from April 2008

[perl #53502] warn some UTF-8 string with CP932 encoding will freeze DOS BOX?

From:
深沢千尋
Date:
April 29, 2008 04:28
Subject:
[perl #53502] warn some UTF-8 string with CP932 encoding will freeze DOS BOX?
Message ID:
rt-3.6.HEAD-3379-1209452214-1873.53502-75-0@perl.org
# New Ticket Created by  "深沢千尋" 
# Please include the string:  [perl #53502]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=53502 >


This is a bug report for perl from query1000@gmail.com,
generated with the help of perlbug 1.36 running under perl 5.10.0.


-----------------------------------------------------------------
[Please enter your report here]
Type following script and save it with UTF-8, and run with Perl 5.10.0 and
Windows XP SP2 DOS BOX.
The DOS BOX will be frozen.

Some how the filename of the program matters with the phenomenon.

I saved the program as;
 C:\Documents and Settings\fuc\へなだべぴよ\test\test.pl
(へなだべぴよ is Japanese pathname Desktop)
and run it as following command;
 C:\> cd Documents and Settings\fuc\へなだべぴよ
 C:\Documents and Settings\fuc\へなだべぴよ\> .\test.pl
and it will cause the freeze.

 But when I saved the program as;
 C:\Documents and Settings\fuc\へなだべぴよ\test\bug.pl
and run it as following command;
 C:\> cd Documents and Settings\fuc\へなだべぴよ
 C:\Documents and Settings\fuc\へなだべぴよ\> .\bug.pl
and it WON'T cause the freeze.

Thank you !

#! /bin/perl -w
#
# if you run this program wirh ActivePerl 5.10.0 and Windows XP, the Dos Box
will be frozen

use utf8;
binmode STDERR, "encoding(:cp932)";

while (<DATA>) {
 if (m|^"(.+?)"|) {
  warn "$1";
 } else {
  warn "no hit";
 }
 print;
}
# data is QUOTATION MARK+BULLET+SPACE+BULLET+QUOTATION MARK
# SPACE  U+0020 http://www.fileformat.info/info/unicode/char/0020/index.htm
# BULLET U+0022 http://www.fileformat.info/info/unicode/char/2022/index.htm
# BULLET U+2022 http://www.fileformat.info/info/unicode/char/2022/index.htm
__DATA__
"‧ ‧"
-- 
Regards,
Chihiro

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=library
    severity=high
---
Site configuration information for perl 5.10.0:

Configured by SYSTEM at Thu Jan 10 11:00:30 2008.

Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
  Platform:
    osname=MSWin32, osvers=5.00, archname=MSWin32-x86-multi-thread
    uname=''
    config_args='undef'
    hint=recommended, useposix=true, d_sigaction=undef
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=undef, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cl', ccflags ='-nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32
-D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DUSE_SITECUSTOMIZE
-DPRIVLIB_LAST_IN_INC -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS
-DUSE_PERLIO -DPERL_MSVCRT_READFIX',
    optimize='-MD -Zi -DNDEBUG -O1',
    cppflags='-DWIN32'
    ccversion='12.00.8804', gccversion='', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64',
lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf
-libpath:"C:\Perl\lib\CORE"  -machine:x86'
    libpth=\lib
    libs=  oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib  netapi32.lib
uuid.lib ws2_32.lib mpr.lib winmm.lib  version.lib odbc32.lib odbccp32.lib
msvcrt.lib
    perllibs=  oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib  netapi32.lib
uuid.lib ws2_32.lib mpr.lib winmm.lib  version.lib odbc32.lib odbccp32.lib
msvcrt.lib
    libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl510.lib
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug
-opt:ref,icf  -libpath:"C:\Perl\lib\CORE"  -machine:x86'

Locally applied patches:
    ACTIVEPERL_LOCAL_PATCHES_ENTRY
    32809 Load 'loadable object' with non-default file extension
    32728 64-bit fix for Time::Local
---
@INC for perl 5.10.0:
    C:\Perl\mylib
    C:/Perl/site/lib
    C:/Perl/lib
---
Environment for perl 5.10.0:
    HOME (unset)
    LANG=ja_JP.SJIS
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)

PATH=C:\Perl\site\bin;C:\Perl\bin;C:\namazu\bin;C:\CFusionMX7\verity\k2\_nti40\bin;C:\Perl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
Files\Common Files\Adobe\AGL;C:\Perl\perl;C:\Documents and Settings\All
Users\Application Data\Logoport;C:\Program
Files\QuickTime\QTSystem\;C:\mojicode_script;C:\Perl\perl;C:\Perl\perl_bak
    PERL5LIB=C:\Perl\mylib
    PERL_BADLANG (unset)
    SHELL (unset)



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