从Perl将Unicode字符串传递给终端

时间:2016-09-13 13:33:59

标签: perl unicode

我正在运行this assistive technology project

它包含以下Perl脚本,该脚本使用eSpeak从文本创建wav。 (然后浏览器为用户播放文件)

#!/usr/bin/perl
use strict;
    use warnings;
use CGI qw(:standard -debug);
my $text = param('text');
my $filename = param('filename');
die if $text =~ /\x00/;
die if $filename =~ /\x00/;
print "Content-type: text/html\n\n";
$text =~ s/^-+//;
system('/home/joereddington/tts/espeak-1.48.04-source/src/speak', $text, '-w', $filename .  '.wav', '-v', 'en');

这适用于英语,但在保加利亚语和阿拉伯语版本上,我只是得到了#34; Hashtag 0392,Hashtag 0929,..."一遍又一遍地。我假设这是因为在这个过程中的某个时刻,这些字符集的unicode正在被屠杀。

我该怎么做才能解决这个问题?

0 个答案:

没有答案