=head1 NAME Char::Normalize::FullwidthHalfwidth - Fullwidth/halfwidth character normalization =head1 SYNOPSIS use Char::Normalize::FullwidthHalfwidth qw/normalize_width/; $s = <>; normalize_width (\$s); print $s; =head1 DESCRIPTION The C module provides a function that normalizes fullwidth/halfwidth compatibility characters into their canonical representations. =head1 FUNCTIONS This module provides functions C and C. They can be imported to a package by specifying their names as arguments to the C statement: use Char::Normalize::FullwidthHalfwidth qw/normalize_width/; Note that the C statement does not export anything unless the function names were explicitly specified. Alternatively, you can invoke the functions in their fully-qualified forms: require Char::Normalize::FullwidthHalfwidth; Char::Normalize::FullwidthHalfwidth::normalize_width (\$scalarref); =over 4 =item C)> Normalize the fullwidth/halfwidth characters in the scalar referenced by the argument into their preferable form. The argument must be a scalar reference. The scalar is treated as a character string (possibly with the utf8 flag set), not a byte string. The function returns the scalar reference. The function performs the following conversions: =over 4 =item A character C C (so-called fullwidth space) Replaced by a C C (so-called halfwidth space) character. =item Characters in the range C..C (so-called fullwidth ASCII characters) Replaced by a character in the range C..C (so-called halfwidth ASCII characters). =item Characters in the range C..C (halfwidth Katakana) Replaced by a corresponding so-called fullwidth Katakana (or ideographic punctuation). Note that C C and C C are replaced by C C and C C respectively, not their spacing variants. =item Characters in the range C..C (fullwidth symbols) Replaced by a corresponding canonical character. =back =item combine_voiced_sound_marks (I<$scalarref>) Replace any sequence of (fullwidth) hiragana or katakana followed by a C C or C C by its precomposed form, if possible. In many cases you would like to apply this function just after the C function. =item $t = get_fwhw_normalized $s Return a normalized B of the argument string (not reference). It performes normalization performed by C and C, as well as some additional convertions. =back =head1 BUGS Not all compatibility characters in the fullwidth and halfwidth block of the Unicode Standard are currently supported - especially, halfwidth Hangul syllables are not converted to their fullwidth equivalents. A future version of this module is expected to address this issue by extending the conversion table. =head1 AUTHOR Wakaba . =head1 HISTORY This module was originally developed as part of SuikaWiki L. =head1 LICENSE Copyright 2008-2016 Wakaba . This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut