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