develooper Front page | perl.perl5.porters | Postings from May 2013

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

From:
James E Keenan via RT
Date:
May 27, 2013 12:43
Subject:
[perl #53276] warn some UTF-8 string with CP932 encoding will freeze DOS BOX?
Message ID:
rt-3.6.HEAD-2650-1369658600-1292.53276-15-0@perl.org
On Thu Apr 24 02:30:43 2008, query1000@gmail.com wrote:
> 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__
> "‧ ‧"


I was reviewing older tickets this morning and came across this one. 
query1000: Were you ever able to resolve this problem?

Thank you very much.
Jim Keenan

---
via perlbug:  queue: perl5 status: new
https://rt.perl.org:443/rt3/Ticket/Display.html?id=53276



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