5 Locale::Script - standard codes for script identification
11 $script = code2script('phnx'); # 'Phoenician'
12 $code = script2code('Phoenician'); # 'Phnx'
13 $code = script2code('Phoenician',
14 LOCALE_CODE_NUMERIC); # 115
16 @codes = all_script_codes();
17 @scripts = all_script_names();
21 This module provides access to standards codes used
22 for identifying scripts, such as those defined in ISO 15924.
24 Most of the routines take an optional additional argument which
25 specifies the code set to use. If not specified, the default ISO
26 15924 four-letter codes will be used.
28 =head1 SUPPORTED CODE SETS
30 There are several different code sets you can use for identifying
31 scripts. A code set may be specified using either a name, or a
32 constant that is automatically exported by this module.
34 For example, the two are equivalent:
36 $script = code2script('phnx','alpha');
37 $script = code2script('phnx',LOCALE_SCRIPT_ALPHA);
39 The codesets currently supported are:
43 =item B<alpha, LOCALE_SCRIPT_ALPHA>
45 This is a set of four-letter (capitalized) codes from ISO 15924
46 such as 'Phnx' for Phoenician. It also includes additions to this
47 set included in the IANA language registry.
49 The Zxxx, Zyyy, and Zzzz codes are not used.
51 This is the default code set.
53 =item B<num, LOCALE_SCRIPT_NUMERIC>
55 This is a set of three-digit numeric codes from ISO 15924 such as 115
64 =item B<code2script(CODE [,CODESET] [,'retired'])>
66 =item B<script2code(NAME [,CODESET] [,'retired'])>
68 =item B<script_code2code(CODE ,CODESET ,CODESET2)>
70 =item B<all_script_codes([CODESET] [,'retired'])>
72 =item B<all_script_names([CODESET] [,'retired'])>
74 =item B<Locale::Script::rename_script(CODE ,NEW_NAME [,CODESET])>
76 =item B<Locale::Script::add_script(CODE ,NAME [,CODESET])>
78 =item B<Locale::Script::delete_script(CODE [,CODESET])>
80 =item B<Locale::Script::add_script_alias(NAME ,NEW_NAME)>
82 =item B<Locale::Script::delete_script_alias(NAME)>
84 =item B<Locale::Script::rename_script_code(CODE ,NEW_CODE [,CODESET])>
86 =item B<Locale::Script::add_script_code_alias(CODE ,NEW_CODE [,CODESET])>
88 =item B<Locale::Script::delete_script_code_alias(CODE [,CODESET])>
90 These routines are all documented in the L<Locale::Codes::API> man page.
98 =item L<Locale::Codes>
100 The Locale-Codes distribution.
102 =item L<Locale::Codes::API>
104 The list of functions supported by this module.
106 =item L<http://www.unicode.org/iso15924/>
108 Home page for ISO 15924.
110 =item L<http://www.iana.org/assignments/language-subtag-registry>
112 The IANA language subtag registry.
118 See Locale::Codes for full author history.
120 Currently maintained by Sullivan Beck (sbeck@cpan.org).
124 Copyright (c) 1997-2001 Canon Research Centre Europe (CRE).
125 Copyright (c) 2001-2010 Neil Bowers
126 Copyright (c) 2010-2015 Sullivan Beck
128 This module is free software; you can redistribute it and/or
129 modify it under the same terms as Perl itself.