Convert::EastAsianWidth - Convert between full- and half-width characters
This document describes version 0.03 of Convert:EastAsianWidth, released October 3, 2003.
# Exports to_fullwidth() and to_halfwidth() by default use Convert::EastAsianWidth; my $u = to_fullwidth('ABC'); # Full-width variant of 'ABC' my $b = to_fullwidth('ABC', 'big5'); # Ditto, but in big5 encoding my $x = to_halfwidth($u); # Gets back 'ABC' my $y = to_halfwidth($b, 'big5'); # Same as above
This module uses the regular expression properties provided by Unicode::EastAsianWidth to efficiently convert between full- and half-width characters.
The first argument is the string to be converted; the second one represents the input and encodings. If omitted, both are assumed by to Unicode strings.
In Perl versions before 5.8, Encode::compat is required for the encoding conversion function to work.
Autrijus Tang <firstname.lastname@example.org>
Copyright 2003 by Autrijus Tang <email@example.com>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.