perl-unicode

Is \p{EastAsianFullwidth} worth implementing?

2002-09-18 20:30:06
Hi there.  Recently I need to do some hacking based on the EastAsianWidth
property (cf. http://www.unicode.org/unicode/reports/tr11/) of unicode
characters.  Naturally, I tried the regular expression \p{} and \P{} syntax,
with no avail.

Naturally, I can hack up a local patch to unicore/{Canonical,Exact}.pl
and parse the yet-unused unicore/EastAsianWidth.txt to add the desired
properties in, namely (better names welcome):

        \p{En}          \p{EastAsianNeutral}
        \p{Ea}          \p{EastAsianAmbiguous}
        \p{Eh}          \p{EastAsianHalfwidth}
        \p{Ew}          \p{EastAsianWide}
        \p{Ef}          \p{EastAsianFullwidth}
        \p{Ena}         \p{EastAsianNarrow}

But as it overrides core modules's behaviours, I'd hesitate to release it
as a CPAN module (Unicode::EastAsianWidth), but rather suggest it to
be included in core perl.

Are there any hidden drawbacks or other problems with this idea?

Thanks,
/Autrijus/

Attachment: pgp1Lfgd3mZq2.pgp
Description: PGP signature