Unicode::Unihan - The Unihan Data Base 5.1.0
use Unicode::Unihan; my $uh = Unicode::Unihan->new; print join("," => $uh->Mandarin("\x{5c0f}\x{98fc}\x{5f3e}")), "\n";
This module provides a user-friendly interface to the Unicode Unihan Database 5.1. With this module, the Unihan database is as easy as shown in the SYNOPSIS above.
The first thing you do is make the database available. Just say
use Unicode::Unihan; my $uh = Unicode::Unihan->new;
That's all you have to say. After that, you can access the database via $uh->tag($string) where tag is the tag in the Unihan Database, without 'k' prefix.
The first form (scalar context) returns the Unihan Database entry of the first character in $string. The second form (array context) checks the entry for each character in $string.
@data = $uh->Mandarin("\x{5c0f}\x{98fc}\x{5f3e}"); # @data is now ('SHAO4 XIAO3','SI4','DAN4') @data = $uh->JapaneseKun("\x{5c0f}\x{98fc}\x{5f3e}"); # @data is now ('CHIISAI KO O','KAU YASHINAU','TAMA HAZUMU HIKU')
For a complete list of tags, their meaning, and information on parsing the value field, see http://www.unicode.org/reports/tr38/.
http://www.unicode.org/Public/UNIDATA/Unihan.html
Dan Kogai <dankogai@dan.co.jp>
Unicode, Inc.
This module is currently maintained by brian d foy (bdfoy@cpan.org) for legacy applications.
bdfoy@cpan.org
Copyright 2002-2008 by Dan Kogai, All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Copyright (c) 1996-2008 Unicode, Inc. All Rights reserved.
Name: Unihan database Unicode version: 5.1.0 Table version: 1.1 Date: 3 March 2008
To install Unicode::Unihan, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Unicode::Unihan
CPAN shell
perl -MCPAN -e shell install Unicode::Unihan
For more information on module installation, please visit the detailed CPAN module installation guide.