logo       

Bug on GNUWin32 sed 4.1.4: msg#00061

editors.sed.user

Subject: Bug on GNUWin32 sed 4.1.4


Hi,

I think it is a bug. But I hope someone can tell why it is not
a bug? Or, if it does is a bug, please advise what kind of info
should also be provided before submitting it?

Windows sp1
GnuWin32 sed 4.1.4

lost response when:
echo 中aaa| gsed "s/[a-z]//g; s/./a/g"

Here is the script,
gsed "s/[a-z ]//g; s/./a/g"
to strip English letters from input which contains Chinese
character (double byte)and replace Chinese chars with "a"s.

-------------------------------------------------
E:\tmp>echo 中a| gsed "s/[a-z]//g; s/./a/g"
a <- one Chinese char follows a letter

E:\tmp>echo 中aa| gsed "s/[a-z]//g; s/./a/g"
a <- follows 2 letters

E:\tmp>echo 中aaa| gsed "s/[a-z]//g; s/./a/g"
^C <- follows 3 letters ** without response **
E:\tmp>echo 中aaaa| gsed "s/[a-z]//g; s/./a/g"
a <- follows 4 letters

E:\tmp>echo 中aaaaa| gsed "s/[a-z]//g; s/./a/g"
^C <- follows 5 letters ** without response **
E:\tmp>echo a中aaa| gsed "s/[a-z]//g; s/./a/g"
a <- OK if the Chinese char doesn't come first

E:\tmp>echo a中aa| gsed "s/[a-z]//g; s/./a/g"
a

-------------------------------------------------

gsed 4.1.1 DJGPP port, ssed 3.62, csed is OK with the
same command, though they replace the Chinese char with
2 "a"s instead of 1.

E:\tmp>echo 中aaa| gsed411 "s/[a-z]//g; s/./a/g"
aa

I tried to put the script and input into files and invoked
gsed -f shouldnotcrash.sed test.file
but it lose response again.

--
Regards,
hq00e



------------------------ Yahoo! Groups Sponsor --------------------~-->
Most low income homes are not online. Make a difference this holiday season!
http://us.click.yahoo.com/5UeCyC/BWHMAA/TtwFAA/dkFolB/TM
--------------------------------------------------------------------~->

--

Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/sed-users/

<*> To unsubscribe from this group, send an email to:
sed-users-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/






<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise