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

  • SEARCH
  • Home
  • 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 8320915
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T22:49:58+00:00 2026-06-08T22:49:58+00:00

Hello I have a character encoding problem in my application and thought to ask

  • 0

Hello I have a character encoding problem in my application and thought to ask for some help, because I couldn’t solve the problem even thought I was given some guidance so here goes:
My Ä and Ö characters are shown in the browser as: �

I will also post all what I have done so far trying to solve the problem:

1) Database: I have tried changing the collation of my tables, here are some info what SHOW TABLE STATUS gives for one of my tables:

Name = test_groups
Engine = InnoDB
Version = 10
Row_format = Compact
Collation = utf8_swedish_ci

Database character variables gives:

| character_set_client = utf8
| character_set_connection =
utf8
| character_set_database = latin1 (I
Wonder is this the cause?)
| character_set_filesystem
= binary
| character_set_results = utf8
| character_set_server = utf8
|
character_set_system = utf8

2) In apache httpd.conf I have:

AddDefaultCharset UTF-8

3) In my Zend-application application.ini:

resources.view.encoding = “UTF-8”

4) In my firefox 14.0.1 browser

edit->preferences->content->advanced->Default character encoding =
Unicode (UTF-8)

5) In my php code meta-tag:

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

Now here’s also few other interesting things: When I look at my page and change from firefox

View->Character encoding->Western (ISO-8859-1)

, the �-characters which came from the MySQL database turn out ok to öä-characters, but the öä-characters that come from my php-code turn into ät-characters.

Another thing when I check the encoding of the data coming from my MySQL-database with

mb_detect_encoding($DATA_FROM_MYSQL_DATABASE)

it outputs UTF-8!! Then lastly if I do in the code:

utf8_encode($DATA_FROM_MYSQL_DATABASE)

and output the result the problem disappears that is �-characters -> öä-characters. So what’s going on here x) All help appreciated

  • 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-06-08T22:50:00+00:00Added an answer on June 8, 2026 at 10:50 pm

    Are you sending SET NAMES utf8 in your PHP as the first query to MySQL ? That could be the cause if not.

    SET NAMES indicates what character set the client will use to send SQL
    statements to the server. Thus, SET NAMES ‘cp1251’ tells the server,
    “future incoming messages from this client are in character set
    cp1251.” It also specifies the character set that the server should
    use for sending results back to the client. (For example, it indicates
    what character set to use for column values if you use a SELECT
    statement.)

    SET NAMES utf8 in MySQL? has more detail about how and why.

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

Sidebar

Related Questions

Hello everyone I have a difficult problem with using BULK INSERT command when I
Hello Guys: I have a scrollView in which I've populated some uibuttons horizontally. The
I have a problem running a simple Hello-world program in C++ on my Windows
Hello I have a bizarre problem with sprintf . Here's my code: void draw_number(int
I have an array like so array( 1=>hello, 2=>foo, 3=>192, 4=>keep characters AND digits
Hello I have like this 2 tables class User public int UserId{get;set;} { ....
Hello i have 2 arrays and and i want to put them in a
Hello I have next function, what always return null as result, but service calling
hello i have this question i was trying to find a way to call
hello I have my code that connects to my ftp server $conn_id = ftp_connect($ftp_server);

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.