boboson has asked for the wisdom of the Perl Monks concerning the following question:
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") );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: can't get å,ä and ö to work with Class::PhraseBook
by graff (Chancellor) on Mar 13, 2006 at 00:05 UTC | |
by Anonymous Monk on Mar 13, 2006 at 09:58 UTC | |
by boboson (Monk) on Mar 13, 2006 at 14:34 UTC | |
by boboson (Monk) on Mar 13, 2006 at 23:08 UTC | |
|
Re: can't get å,ä and ö to work with Class::PhraseBook
by Aristotle (Chancellor) on Mar 12, 2006 at 22:15 UTC | |
by boboson (Monk) on Mar 12, 2006 at 22:55 UTC |