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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T20:31:51+00:00 2026-05-16T20:31:51+00:00

My database field is set to utf8_general_ci and my websites encoding is utf8. The

  • 0

My database field is set to utf8_general_ci and my websites encoding is utf8.

The £ symbol is coming up as a black diamond with a question mark through the center.

I tried changing it to £ in the database and it just outputted £

I tried a string replace:

  $row['Information'] = str_replace("£", "£", $row['Information']);

Nothing seems to work, any ideas?

  • 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-16T20:31:51+00:00Added an answer on May 16, 2026 at 8:31 pm

    I tried changing it to £ in the database

    Don’t. The database should contain raw text, never HTML-encoded content. The time to HTML-encode (using htmlspecialchars()) is when you insert some raw text into HTML at the output templating stage, and not before. Even if you got this to work, you’d only have fixed one character; the other 107025 non-ASCII characters would still break.

    Clearly there is a mismatch of encodings here; you must ensure you use the same encoding (preferably UTF-8) everywhere, in particular:

    • the encoding you’ve saved the PHP file in, if it contains any non-ASCII characters;
    • the charset declared on the output page (by Content-Type <meta> or header(), preferably both; if you only use a <meta> to set it and the server is incorrectly configured it may set its own charset overriding yours);
    • the encoding of the column in the database (each column has its own collation, so just setting it on the table is ineffective);
    • the encoding used by PHP to talk to MySQL. This should be set using mysql_set_charset.

    Unfortunately, none of these settings default to UTF-8.

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

Sidebar

Related Questions

In a database prototype, I have a set of fields (like name, description, status)
Given a database field named widget_ids, containing data like 67/797/124/ or 45/, where the
I have a database field called abCode , that I want to map to
I need to store several date values in a database field. These values will
In my code i create a HyperLinkField object. Depending on a database field value,
I have Informix database with timestamp field defined as YEAR TO SECOND. When I
How can I embed HTML into the ShoppingItem database table description field in such
In my database (SQL 2005) I have a field which holds a comment but
I have a field in a database that is nearly unique: 98% of the
I have a binary field in my database that is hard to describe in

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.