What is the default character set for documents?

5 posts / 0 new
Last post
#1 Fri, 06/10/2011 - 06:33
-eclipse-

What is the default character set for documents?

Hi All

Where can I see the default character set for documents for all virtual sites? I know I can change the actually character set within the Virtualmin -> Select Virtual site -> Services -> Configure Website -> Languages

I had to change some of our sites to iso-8859-1 to show the special characters used in Denmark. But what is the default and where do I change that?

Looking forward to hear from you.

Best Regards Tim Nielsen

Fri, 06/10/2011 - 07:44
andreychek

Howdy,

What distribution are you using?

How to set that depends on your distribution... on Debian and Ubuntu, there is a file named "charset" located in /etc/apache2/conf.d/charset where you can specify a default character set with "AddDefaultCharset".

You can read the specifics of how "AddDefaultCharset" works here:

http://httpd.apache.org/docs/2.2/mod/core.html#adddefaultcharset

Tue, 06/14/2011 - 03:16
-eclipse-

Hi Andrey

We are running CentOS Linux 5.6, Webmin version 1.550 and Virtualmin version 3.86 Pro. Isn't it possible to manipulate the character set within the creation of a new virtual site?

  • Tim Nielsen
Tue, 08/09/2011 - 10:14
-eclipse-

Hi Eric

I can't find the "charset" file as described above. I need to change this accordingly to iso-8859-1 so that we can use the correct character set on our server.

I just tried to manually change it for a newly virtual site on our setup, without luck. When doing that in Virtualmin -> Services -> Configure Website -> Language the server begins to use 100% CPU and the memory just get eaten up. Every site on the server crashes and I have to reset the server to get it up and running again.

The funny thing is that when I go into the "language" menu it is normally represented by telling me what site I am currently working on. Such as :

Languages For domain.tld:80

But instead it only displayed the following

Languages For :80

I have now tried to delete the virtual site and create it again and now I see the domain.tld in the header / title? It now seems to work as predicted, so that I can change the character set for the specific?

But I would like to change the default character set to avoid doing this every time.

Looking forward to hear from you.

-Tim

Wed, 08/17/2011 - 19:46
andreychek

Howdy,

On CentOS, I think the default characterset may be set in /etc/httpd/conf/httpd.conf.

Edit that file, and look for a line that looks something like this:

AddDefaultCharset UTF-8</code?
 
You can change that to be "iso-8859-1" you were looking for.
 
You can also set that in a specific domain's VirtualHost block, or even in a .htaccess file, if you're only looking to change the default in a few places.
 
  -Eric
Topic locked