1

Webmin is serving static help pages.

Webmin 1.47 was using the characters set was iso-8859-1 as character encoding. This information is transmitted by the HTTP header

content type:"Text/html; Charset=iso-8859-1"

After migration to a newer configuration using Webmin 1.81, the content type header is now utf-8 instead of the old iso-8859-1. This difference result into a bad displaying of special characters.

content type:"Text/html; Charset=utf-8"

We are using the Xinet deamon.

I would like not to convert my oldest help pages but would rather indicates that older pages are encoded in iso-8859-1 in their code.

Have I to convert all my help page from iso-8859-1 to utf-8? May I indicate that the encoding is iso-8859-1 at the level of Webmin? Where is decided the encoding for the Webmin pages?

1
  • I cannot answer for webmin, but it should be relatively painless to convert your old files, see man iconv.
    – meuh
    Commented Aug 23, 2016 at 16:37

1 Answer 1

2

Since it's HTML, you should be able to use meta http-equiv or meta charset to override, by putting on of these in the document's header:

<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<!-- or -->
<meta charset="iso-8859-1">

You could also check if it's actually served by Apache (or similar); most web servers will have a way to set the charset on a per-path basis.

but I fully expect iconv -f latin1 -t utf8 (convert to utf8) to be a much easier solution (of course, if any of your pages already have a meta header giving the character set, you'll have to change them—iconv doesn't do that for you).

2
  • iconv by itself won't work as you suggest if the page has a charset already in it. Commented Aug 23, 2016 at 20:29
  • @ThomasDickey indeed, but if it already has a charset in it—then it shouldn't be getting funny characters in the browser. Nonetheless, that's a good thing to clarify.
    – derobert
    Commented Aug 23, 2016 at 20:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .