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?

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

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).

  • iconv by itself won't work as you suggest if the page has a charset already in it. – Thomas Dickey Aug 23 '16 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 Aug 23 '16 at 20:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.