-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update SYNOPSIS and switch to public domain (CC0).
- Loading branch information
Showing
21 changed files
with
2,330 additions
and
691 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,30 @@ | ||
--- | ||
abstract: East Asian Width properties | ||
author: | ||
- Audrey Tang <cpan@audreyt.org> | ||
--- | ||
abstract: 'East Asian Width properties' | ||
author: | ||
- '唐鳳 <cpan@audreyt.org>' | ||
build_requires: | ||
ExtUtils::MakeMaker: 6.62 | ||
configure_requires: | ||
ExtUtils::MakeMaker: 6.62 | ||
distribution_type: module | ||
generated_by: Module::Install version 0.68 | ||
license: mit | ||
meta-spec: | ||
url: http://module-build.sourceforge.net/META-spec-v1.3.html | ||
version: 1.3 | ||
dynamic_config: 1 | ||
generated_by: 'Module::Install version 1.04' | ||
license: unrestricted | ||
meta-spec: | ||
url: http://module-build.sourceforge.net/META-spec-v1.4.html | ||
version: 1.4 | ||
module_name: Unicode::EastAsianWidth | ||
name: Unicode-EastAsianWidth | ||
no_index: | ||
directory: | ||
no_index: | ||
directory: | ||
- inc | ||
- t | ||
provides: | ||
Unicode::EastAsianWidth: | ||
file: lib/Unicode/EastAsianWidth.pm | ||
version: 1.30 | ||
requires: | ||
requires: | ||
perl: 5.6.0 | ||
version: 1.30 | ||
resources: | ||
homepage: http://github.com/audreyt/Unicode-EastAsianWidth/tree | ||
repository: | ||
type: git | ||
url: git://github.com/audreyt/Unicode-EastAsianWidth.git | ||
web: http://github.com/audreyt/Unicode-EastAsianWidth/tree | ||
version: 1.31 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# 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(0x2010); # HYPHEN, an ambiguous-width character | ||
|
||
/\p{InEastAsianAmbiguous}/; # True | ||
/\p{InFullwidth}/; # False | ||
|
||
To mark ambiguous-width characters as InFullwidth: | ||
|
||
BEGIN { $Unicode::EastAsianWidth::EastAsian = 1; } | ||
use Unicode::EastAsianWidth; | ||
|
||
$_ = chr(0x2010); # HYPHEN, an ambiguous-width character | ||
/\p{InFullwidth}/; # True | ||
|
||
# DESCRIPTION | ||
|
||
This module provide user-defined Unicode properties that deal with | ||
width status of East Asian characters, as specified in | ||
[http://www.unicode.org/unicode/reports/tr11/](http://www.unicode.org/unicode/reports/tr11/). | ||
|
||
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` at compile time | ||
within a `BEGIN` block before loading this module: | ||
|
||
BEGIN { $Unicode::EastAsianWidth::EastAsian = 1 } | ||
use Unicode::EastAsianWidth; | ||
|
||
Setting `$Unicode::EastAsianWidth::EastAsian` at run-time used to | ||
work on Perl versions between 5.8 and 5.14 due to an implementation | ||
detail, but it will no longer work on Perl 5.16 and later versions, | ||
and hence is not recommended. | ||
|
||
# SEE ALSO | ||
|
||
[perlunicode](http://search.cpan.org/perldoc?perlunicode), | ||
[http://www.unicode.org/unicode/reports/tr11/](http://www.unicode.org/unicode/reports/tr11/) | ||
|
||
# AUTHORS | ||
|
||
唐鳳 <cpan@audreyt.org> | ||
|
||
# CC0 1.0 Universal | ||
|
||
To the extent possible under law, 唐鳳 has waived all copyright and related | ||
or neighboring rights to Unicode-EastAsianWidth. | ||
|
||
This work is published from Taiwan. | ||
|
||
[http://creativecommons.org/publicdomain/zero/1.0](http://creativecommons.org/publicdomain/zero/1.0) |
Oops, something went wrong.