我用Google搜索了(好吧,实际上是DuckDuckGo),直到我脸色发青,但找不到该类型en-GB或fr-CA任何地方的语言代码列表.
有关组件的优秀资源,特别是W3C I18n页面,但我希望有一个简单的字母列表,如果可能的话,这是相当规范的(类似这一个).找不到.
谁能指出我正确的方向?非常感谢!
我想我可能已经阅读usort过StackOverflow上的每篇文章,但我无法解决这个问题.这可能usort不是我需要的工具吗?这里有一些我正在使用的数组(我将其分配给$allPages):
Array
(
[0] => Page Object
(
[id] => 4
[slug] => articles
[created_on] => 2009-08-06 07:16:00
)
[1] => Page Object
(
[id] => 99
[slug] => a-brief-history
[created_on] => 2011-04-25 12:07:26
)
[2] => Page Object
(
[id] => 98
[slug] => we-arrive
[created_on] => 2011-04-24 13:52:35
)
[3] => Page Object
(
[id] => 83
[slug] => new-year
[created_on] => 2011-01-02 14:05:12
)
)
Run Code Online (Sandbox Code Playgroud)
我最终试图对created_on价值进行分类,但就目前而言,我决定能够对它们中的任何一个进行排序!当我尝试普通cmp($a, $b)类型回调时 …
我有一些文本文件,其中包含许多Unicode希伯来语和希腊语,需要将它们包含在HTML <span class ="hebrew">...</span>元素中.这些文件属于已运行多年的项目.
大约八年前,我们成功地使用这个Perl脚本来完成这项工作.
#!/usr/bin/perl
use utf8;
my $table = [
{
FROM => "\\x{0590}",
TO => "\\x{05ff}",
REGEX => "[\\x{0590}-\\x{05ff}]",
OPEN => "<span class =\"hebrew\">",
CLOSE => "</span>",
},
{
FROM => "\\x{0370}",
TO => "\\x{03E1}",
REGEX => "[\\x{0370}-\\x{03E1}]|[\\x{1F00}-\\x{1FFF}]",
OPEN => "<span class =\"greek\">",
CLOSE => "</span>",
},
];
binmode(STDIN,":utf8");
binmode(STDIN,"encoding(utf8)");
binmode(STDOUT,":utf8");
binmode(STDOUT,"encoding(utf8)");
while (<>) {
my $line = $_;
foreach my $l (@$table) {
my $regex = $l->{REGEX},
my ($from, $to) = ($l->{FROM},$l->{TO});
my ($open, $close) …Run Code Online (Sandbox Code Playgroud)