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 248555
In Process

The Archive Base Latest Questions

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

Why is this the extended ascii character (â, é, etc) getting replaced with <?>

  • 0

Why is this the extended ascii character (â, é, etc) getting replaced with <?> characters?

I attached a pic… but I am using PHP to pull the data from MySQL, and some of these locations have extended characters… I am using the Font Arial.

You can see the screen shot here: http://img269.imageshack.us/i/funnychar.png/

Still happening after the suggestions, here is what I did:

My firefox (view->encoding) is set to UTF-8 after adding the line, however, the text inside the option tags is still showing the funny character instead of the actual accented one. What should I look for now?

UPDATE:
I have the following in the PHP program that is giving my those <?> characters…

ini_set( 'default_charset', 'UTF-8' );

And right after my zend db object creation, I am setting the following query:

$db->query("SET NAMES utf8;");

I changed all my tables over to UTF-8 and reinserted all the data (waste of time) as it never helped. It was latin1 prior.

Also STATUS is reporting:

Connection:             Localhost via UNIX socket
Server characterset:    latin1
Db     characterset:    latin1
Client characterset:    utf8
Conn.  characterset:    utf8
UNIX socket:            /var/run/mysqld/mysqld.sock
Uptime:                 4 days 20 hours 59 min 41 sec

Looking at the source of the page, I see
<option value=”Br�l� Lake”> Br�l� Lake

OK- NEW UPDATE-
I Changed everything in my PHP and HTML to:

and

header(‘Content-Type: text/html; charset=latin1’);

Now it works, what gives?? How do I convert it all to UTF-8?

  • 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-11T21:21:10+00:00Added an answer on May 11, 2026 at 9:21 pm

    That’s what the browser does when it doesn’t know the encoding to use for a character. Make sure you specify the encoding type of the text you send to the client either in headers or markup meta.

    In HTML:

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

    In PHP (before any other content is sent to the client):

    header('Content-Type: text/html; charset=utf-8');
    

    I’m assuming you’ll want UTF-8 encoding. If your site uses another encoding for text, then you should replace UTF-8 with the encoding you’re using.

    One thing to note about using HTML to specify the encoding is that the browser will restart rendering a page once it sees the Content-Type meta tag, so you should include the <meta /> tag immediately after the <head /> tag in your page so the browser doesn’t do any more extra processing than it needs.

    Another common charset is “iso-8859-1” (Basic Latin), which you may want to use instead of UTF-8. You can find more detailed info from this awesome article on character encodings and the web. You can also get an exhaustive list of character encodings here if you need a specific type.


    If nothing else works, another (rare) possibility is that you may not have a font installed on your computer with the characters needed to display the page. I’ve tried repeating your results on my own server and had no luck, possibly because I have a lot of fonts installed on my machine so the browser can always substitute unavailable characters from one font with another font.

    What I did notice by investigating further is that if text is sent in an encoding different than the encoding the browser reports as, Unicode characters can render unexpectedly. To work around this, I used the HTML character entity representation of special characters, so â becomes &#226; in my HTML and é becomes &#233;. Once I did this, no matter what encoding I reported as, my characters rendered correctly.

    Obviously you don’t want to modify your database to HTML encode Unicode characters. Your best option if you must do this is to use a PHP function, htmlentities(). You should use this function on any data-driven text you expect to have Unicode characters in. This may be annoying to do, but if specifying the encoding doesn’t help, this is a good last resort for forcing Unicode characters to work.

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

Sidebar

Ask A Question

Stats

  • Questions 121k
  • Answers 121k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer It seems that most open source continuous integration servers are… May 12, 2026 at 12:20 am
  • Editorial Team
    Editorial Team added an answer I've never tried that but I think you can solve… May 12, 2026 at 12:20 am
  • Editorial Team
    Editorial Team added an answer Try something like this (not tested): public class CustomModelBinder :… May 12, 2026 at 12:20 am

Related Questions

Here's the problem: In C# I'm getting information from a legacy ACCESS database. .NET
I have 'extended' the System.DateTime struct by adding some essential fields to it. Ideally
So, this appears, on the surface, to be a network admin (serverfault) question, but
I have a cron job on an Ubuntu Hardy VPS that only half works

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.