I create the C::PhraseBook objekt in my CGI::App base class like this.<?xml version="1.0"?> <!DOCTYPE phrasebook [ <!ELEMENT phrasebook (dictionary)*> <!ELEMENT dictionary (phrase)*> <!ATTLIST dictionary name CDATA #REQUIRED> <!ELEMENT phrase (#PCDATA)> <!ATTLIST phrase name CDATA #REQUIRED> ]> <phrasebook> <dictionary name="SE"> <phrase name="1">tävlingar</phrase> </dictionary> <dictionary name="EN"> <phrase name="1">comp</phrase> </dictiona +ry> </phrasebook>
I load the correct language in my subroutines.# get phrasebook $self->param('pb' => new Class::Phrasebook(undef, $self->param('phrase +_url')));
and substitute the variable in my HTML::Template file.# phrasebook handle my $pb = $self->param('pb'); $pb->load("SE");
I want it to print out the Swedish word "tävlingar" but I get the following word "tävlingar" I can't get the Swedish letters å,ä and ö to work with Class::PhraseBook. There is something with the encoding of the XML file that I am missing. I seems like Class::PhraseBook have already decided what encoding to use. Anybody have a solution?$tmpl->param(1 => $pb->get("1") );
In reply to can't get å,ä and ö to work with Class::PhraseBook by boboson
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |