mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2025-01-06 11:38:34 +03:00
utf8
This commit is contained in:
parent
6a500bfc5f
commit
1ca5254006
@ -12,12 +12,12 @@ use utf8;
|
||||
$url = "http://localhost:8080/RPC2";
|
||||
$proxy = XMLRPC::Lite->proxy($url);
|
||||
|
||||
$text = "les élus que nous sommes avons au moins autant le devoir de l' encourager à progresser , en dépit de l' adversité , que de relayer les messages que nous recevons de l' opinion publique dans chacun de nos pays .";
|
||||
$text = "il a souhaité que la présidence trace à nice le chemin pour l' avenir .";
|
||||
|
||||
# Work-around for XMLRPC::Lite bug
|
||||
$encoded = SOAP::Data->type(string => $text);
|
||||
$encoded = SOAP::Data->type(string => Encode::encode("utf8",$text));
|
||||
|
||||
my %param = ("text" => $encoded, "align" => "false", "report-all-factors" => "false");
|
||||
my %param = ("text" => $encoded, "align" => "true", "report-all-factors" => "true");
|
||||
$result = $proxy->call("translate",\%param)->result;
|
||||
print $result->{'text'} . "\n";
|
||||
if ($result->{'align'}) {
|
||||
|
Loading…
Reference in New Issue
Block a user