Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 197437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T16:51:10+00:00 2026-05-11T16:51:10+00:00

My program is fetching messages from a database, which contains English, German and several

  • 0

My program is fetching messages from a database, which contains English, German and several Eastern European languages. My Python script sets the encoding via:

<meta  http-equiv="Content-Type" content="text/html; charset=utf-8"/>

and use the values fetched correctly from the database (if I check within my logs).

Unfortunately all browsers I tested (IE8, Firefox 3.0.10, Opera 9.64) switch based on my local language settings to:

  • Western ISO-8859-1 in Firefox
  • Western European (Windows) in IE
  • Automatic in Opera

Everything works fine as soon as I switch the character encoding manually in the browser.

The same happens if I manually generate the HTML file using UTF-8 (tested with TextMate respective jEdit), although both editors display the content correctly.

That works fine for English and German, but i.e. not for Russian. How can I force the “correct” character encoding?

ANSWER

The following entry within the VirtualHost (Apache configuration) section did the trick for me:

AddDefaultCharset utf-8

Many thanks for pointing me into the right direction, that helped a lot!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T16:51:10+00:00Added an answer on May 11, 2026 at 4:51 pm

    When the document is transfered over HTTP, the HTTP header information are the crutial information:

    […] conforming user agents must observe the following priorities when determining a document’s character encoding (from highest priority to lowest):

    1. An HTTP “charset” parameter in a “Content-Type” field.
    2. A META declaration with “http-equiv” set to “Content-Type” and a value set for “charset“.
    3. The charset attribute set on an element that designates an external resource.

    So make sure you declare the character encoding in the Content-Type header field and not just inside the document.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently creating a C# program which will be fetching some data over https
My problem is that NHibernate gets exponentially slow when fetching records from the database.
In my C# program I wrote a Google Search Function, which works by fetching
Program followed by output. Someone please explain to me why 10,000,000 milliseconds from Jan
Most program languages have some kind of exception handling; some languages have return codes,
A program receives a list of Messages (base type). Each message in the list
My program is downloading data from a server, once he received all the data,
I am writing some code for driving Internet Explorer from a Perl 5 program
Program design: Class A, which implements lower level data handling Classes B-E, which provide
I am writing some code to update an application by fetching new dlls from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.