But please feel free to provide some actual test code that demonstrates the bug
Code that suffers from The Unicode Bug is code that returns different results for equal strings. This is easily demonstrated using the following:
my $s = "\x80\x80";
utf8::upgrade( my $u = $s );
utf8::downgrade( my $d = $s );
is($u, $d);
is(utf8cut($u,2), utf8cut($d,2));
better yet, show how you would've coded it to (at least in your view) "correctly" handle the different strings "\x80\x80" and "\N{U+80}\N{U+80}".
Perl considers those the same value, and any code that doesn't is by definition suffering from The Unicode Bug.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|