The manakai project

Web::Encoding::Normalization

Unicode normalization forms

SYNOPSIS

  use Web::Encoding::Normalization;
  warn to_nfc $input;
  warn to_nfd $input;
  warn to_nfkc $input;
  warn to_nfkd $input;

DESCRIPTION

The Web::Encoding::Normalization module exports functions for applying Unicode normalization operations.

FUNCTIONS

The following functions are available. They are exported by default:

$string = to_nfc $string

Apply the NFC (Normalization Form C) operation to the input and return the result.

$string = to_nfd $string

Apply the NFD (Normalization Form D) operation to the input and return the result.

$string = to_nfkc $string

Apply the NFKC (Normalization Form KC) operation to the input and return the result.

$string = to_nfkd $string

Apply the NFKD (Normalization Form KD) operation to the input and return the result.

$boolean = is_nfc $string

Returns whether the argument is a NFC-normalized string or not.

SPECIFICATIONS

The Unicode Standard.

UAX #15: Unicode Normalization Forms <http://www.unicode.org/reports/tr15/>.

This module supports the latest version of the Unicode Standard at the time of the build of the module files. You should always use the latest version of the module. See <https://github.com/manakai/perl-web-encodings> to get up-to-date version of the module.

DEPENDENCY

The module requires Perl 5.8 or later.

ACKNOWLEDGEMENTS

The module derived from Unicode::Normalize.

LICENSE

Copyright(C) 2001-2012, SADAHIRO Tomoyuki. Japan. All rights reserved.

Copyright 2016 Wakaba <wakaba@suikawiki.org>.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.