Hmm that seems like it might address a slightly different issue, but I will read more about that.

Compare www.paypаl.com vs www.paypal.com. On this computer, it's impossible to tell that the two strings are different by looking at them. On another computer, it's very hard.

This is concern #1 of mine Using UTF-8 Encoding to Bypass Validation Logic

This has nothing to do with Unicode. It's strictly a UTF-8 problem. Since you should decode text before working with it, there's no problem.

Take U+00C9. It could be encoded as

C3 89
or as
E0 83 89

If you work with the characters in their encoded form, they appear to be two different characters. Once you decode them, you're only dealing with character U+00C9. There's no problem if your decoder works properly.

(A quick test shows that Encode only accepts the shortest form. The longer forms are treated as invalid. That's good.)


In reply to Re: validating unicode chars in their smallest form by ikegami
in thread validating unicode chars in their smallest form by damian45

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.