From: Boris Z. <bo...@2b...> - 2002-12-10 22:06:03
|
Hi Gabriel, this is hopfully already fixed. With this patch, that works only for perl 5.8. Perl 5.6.1 should be fine already. I hope the patch applied clean. please let me know. The reason for your double conversion is that perl now converts some strings to utf8 but Text::Iconv did not notice that and convert it again. So we remove T::I for perl 5.8. Maybe we should have a patchpage where all this fixes have a little description and a tarball? Am Dienstag, 10. Dezember 2002 21:23 schrieb Gabriel Burca: > PageKit v1.10 (checked out of CVS on Nov 29th). > Perl 5.8 > HTML::Template 2.6 (see below) > HTML::FillInForm 1.0 (see below) > > > In the model code I have: > $model->fillinform(key => $utf8_string); > $model->output(key => $utf8_string); > > In the template I have: > <input type="text" name="key"> > <MODEL_VAR NAME="key"> > <CONTENT_VAR NAME="some_utf-8"> > > Config.xml > default_input_charset = "UTF-8" > default_output_charset = "UTF-8" > > The form field and <CONTENT_VAR ...> contains the correct unicode > characters. If I try to display the same characters using <MODEL_VAR > ...> on the same page, it looks like the characters get converted to > unicode twice (a single 2-byte unicode character shows up as two > characters). > > I've patched both HTML::FillInForm and HTML::Template and replaced .= > with sprintf "%s%s". That was before I realized the problem only occurs > when using <MODEL_VAR ...>. The View.pm _preparse_model_tags sub has the > "use bytes;" fix. > > This might be the same problem reported by Leo Cambilargiu in the "Odd > Characters" thread. Did anyone figure out that problem? Any ideas of > where the double-conversion might be happening? -- Boris |