From: Gabriel B. <gbu...@eb...> - 2002-12-10 21:21:34
|
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? -- gburca dash pkit at ebixio dot com |