logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

[FormBuilder] Using UTF-8 templates in CGI::FB: msg#00011

Subject: [FormBuilder] Using UTF-8 templates in CGI::FB
Greetings,

I've been developing a UTF-8 based Web application in spanish (es_ES)
with CGI::FormBuilder, which already provides templates for this
language. However, I get weird characters in all JS messages, as well as
errors from the W3C Validator. Please note that I'm not an expert in
this topic, but I think I've narrowed the problem to:

a) The es_ES.pm messages file is encoded in ISO-8859-1 (I opened it with
a UTF-8 aware text editor and rewrote it, then checked it with `file
es_ES.pm` which says that now it is a UTF-8 file)

b) The functions in FormBuilder.pm that write the actual JavaScript code
are using "return <string>", and this last step is not UTF-8 aware (I
don't know why, though). If I add "use Encode;" and then return
encode_utf8(<string>); I get the proper code in the HTML output.

Also, most scripts I checked in were not using "use utf8;". I don't know
if this is mandatory of if it actually helps with something, but just in
case. Can somebody explain to me a proper way to do UTF-8 based forms
with sane characters in the JS alerts and so on?

Jose

-- 
José M. Parrella -> Debian Sid, k2.6.18
Escuela de Ingenieria Electrica
Universidad Central de Venezuela -> ucvlug.info
_______________________________________________
FBusers mailing list
FBusers@xxxxxxxxxxxxxxx
http://www.formbuilder.org/mailman/listinfo/fbusers
<Prev in Thread] Current Thread [Next in Thread>