Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the CGI CPAN distribution.

Report information
The Basics
Id: 26184
Status: resolved
Priority: 0/
Queue: CGI

Owner: Nobody in particular
Requestors: DANKOGAI [...]

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)

Subject: CGI::Util::escape vs. %uXXXX
Download (untitled) / with headers
text/plain 997b
I've already sent you this bug report and patch as Message-Id: <> but the patch got somewhat garbled so I am repeating this via RT. LDS, Hi. This is Dan. Long time no see. Now I am in the middle of the post-YAPC::Asia::2007 hackerthon. I found that the way handles %uXXXX notation is wrong in two ways. 1. UTF-8 flags. Should be off (like %XX) but the current implementation leaves it on. 2. Surrogate pair. Perl 5.8.x now officially outlaws chr($ord) where $ord is whichever half of the surrogate pair. Because of that. %u just fails when the source string contains the escaped surrogate pair. % perl -MCGI -le 'print CGI->new->param("q")' q=%u0061%u5F3E Wide character in print at -e line 1. a弾 % perl -MCGI -le 'print CGI->new->param("q")' q=%u0061%u5F3E%uD869%uDEB2 My patch below fix that. % perl -Mblib -MCGI -le 'print CGI->new->param("q")' q=%u0061%u5F3E%uD869%uDEB2 a弾𪚲 Yours, Dan the Faithful User of
Subject: cgi-util.pat
Download cgi-util.pat
application/octet-stream 2k

Message body not shown because it is not plain text.

Thanks for the patch. It appears it has applied prior to 3.43.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to