NAME
Unicode::EastAsianWidth - East Asian Width properties
VERSION
This document describes version 1.10 of Unicode::EastAsianWidth,
released October 14, 2007.
SYNOPSIS
use Unicode::EastAsianWidth;
$_ = chr(0x2588); # FULL BLOCK, an ambiguous-width character
/\p{InEastAsianAmbiguous}/; # true
/\p{InFullwidth}/; # false
{
local $Unicode::EastAsianWidth::EastAsian = 1;
/\p{InFullwidth}/; # true; only works on perl 5.8+
}
DESCRIPTION
This module provide user-defined Unicode properties that deal with East
Asian characters' width status, as specified in
.
It exports the following functions to the caller's scope, to be used by
Perl's Unicode matching system: "InEastAsianFullwidth",
"InEastAsianHalfwidth", "InEastAsianAmbiguous", "InEastAsianNarrow"
"InEastAsianWide", "InEastAsianNeutral".
In accord to TR11 cited above, two additional context-sensitive
properties are exported: "InFullwidth" (union of "Fullwidth" and "Wide")
and "InHalfwidth" (union of "Halfwidth", "Narrow" and "Neutral").
*Ambiguous* characters are treated by default as part of "InHalfwidth",
but you can modify this behaviour by assigning a true value to
$Unicode::EastAsianWidth::EastAsian.
CAVEATS
Setting $Unicode::EastAsianWidth::EastAsian at run-time only works on
Perl version 5.8 or above. Perl 5.6 users must use a BEGIN block to set
it before the "use" statement:
BEGIN { $Unicode::EastAsianWidth::EastAsian = 1 }
use Unicode::EastAsianWidth;
SEE ALSO
perlunicode,
AUTHORS
Audrey Tang
COPYRIGHT
Copyright 2002, 2003, 2007 by Audrey Tang .
This software is released under the MIT license cited below.
The "MIT" License
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.