标签: latin9

Perl拉丁语9?Unicode - 需要添加支持

我有一个正在扩展到英国的应用程序,我需要添加对Latin-9 Unicode的支持.我做了一些谷歌搜索,但没有发现该过程涉及的内容是什么.有小费吗?

这是一些代码(只是Unicode的东西)

use Unicode::String qw(utf8 latin1 utf16);

# How to call
$encoded_txt = $self->unicode_encode($item->{value});

# Function part
sub unicode_encode {

    shift() if ref($_[0]);
    my $toencode = shift();
    return undef unless defined($toencode);

    Unicode::String->stringify_as("utf8");
    my $unicode_str = Unicode::String->new();


    # encode Perl UTF-8 string into latin1 Unicode::String
    #  - currently only Basic Latin and Latin 1 Supplement
    #    are supported here due to issues with Unicode::String .
    $unicode_str->latin1( $toencode );
    ...
Run Code Online (Sandbox Code Playgroud)

任何帮助都会很棒,谢谢.

编辑:我确实找到了这篇文章:http://czyborra.com/charsets/iso8859.html

unicode perl character-encoding latin9

2
推荐指数
1
解决办法
504
查看次数

标签 统计

character-encoding ×1

latin9 ×1

perl ×1

unicode ×1