Gentoo Archives: gentoo-user

From: hw <hw@×××××××××××××××××××××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] use CGI::FormBuilder::Multi; ...
Date: Sat, 22 Aug 2015 13:29:22
Message-Id: 55D8792A.7010706@gartencenter-vaehning.de
In Reply to: Re: [gentoo-user] use CGI::FormBuilder::Multi; ... by Fernando Rodriguez
1 Am 21.08.2015 um 21:18 schrieb Fernando Rodriguez:
2 > On Friday, August 21, 2015 12:36:59 PM hw wrote:
3 >>
4 >> Hi,
5 >>
6 >> any idea why Umlaute are not displayed correctly when they appear in
7 >> text generated from the FormBuilder module?
8 >>
9 >> When looking at the source of the form in the web browser, it has:
10 >>
11 >>
12 >> <?xml version="1.0" encoding="utf-8"?>
13 >> <!DOCTYPE html
14 >> PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
15 >> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
16 >> <html xmlns="http://www.w3.org/1999/xhtml" lang="de_DE" xml:lang="de_DE">
17 >>
18 >> <head>
19 >> <title>Jobnummer erzeugen</title>
20 >> <link href="/styles/cgiforms.css" rel="stylesheet" type="text/css" />
21 >> <script type="text/javascript"><!-- hide from old browsers
22 >> [...]
23 >>
24 >> </script>
25 >> </head>
26 >> <body>
27 >> <h3>Jobnummer erzeugen</h3>
28 >> <noscript><span class="fb_invalid">Bitte aktivieren Sie JavaScript oder
29 >> benutzen Sie einen neueren Webbrowser.</span></noscript>
30 >> <p>Sie m�ssen Angaben f�r die <span
31 >> class="fb_required">hervorgehobenen</span> Felder machen.</p>
32 >> [...]
33 >>
34 >>
35 >> So the header says the encoding is UTF-8. The message template is also
36 >> UTF-8:
37 >>
38 >> sunflo cgi-bin # file
39 >> /usr/lib/perl5/vendor_perl/5.20.1/CGI/FormBuilder/Messages/de.pm
40 >> /usr/lib/perl5/vendor_perl/5.20.1/CGI/FormBuilder/Messages/de.pm: Perl5
41 >> module source, UTF-8 Unicode text
42 >> sunflo cgi-bin #
43 >>
44 >>
45 >> Text with Umlauten I put myself into the form, like field labels, are
46 >> shown correctly. I have put '@charset "utf-8";' at the beginning of the
47 >> style sheet, but it doesn't help.
48 >>
49 >> How could I fix this problem?
50 >
51 > This is probably not the best list for this question, but one possible
52
53 Likely not, yet it could be a Gentoo-specific problem.
54
55 > solution is to html encode it. You can use app-text/recode as follows:
56 >
57 > # echo 'ü' | recode utf8...html
58 > &uuml;
59 >
60 > Or just use the codes from:
61 > http://www.lsa.umich.edu/german/hmr/schreiben/umlaute/umlaute_ASCII_html.html
62
63 Thanks, I could patch the message template accordingly, that would solve
64 the problem :)