Jump to content

Recommended Posts

Hi. I have a field in a table `Comment` varchar(32).

 

I enter the following text Food value £12.52, but when I back up the table and look at it in a text editor I get the following.

 

Food value £12.52 I have a character ascii value 0194 before the pound sign. Can I correct this?

 

I forgot to say that I don't see this character when I am looking at the web page.

Edited by otuatail
Link to comment
https://forums.phpfreaks.com/topic/298140-strange-table-entry-in-varchar-field/
Share on other sites

Your character encoding settings are not consistent. Make sure that

- Your HTML pages are using UTF-8 because they do not by default; use a and/or configure your server and PHP code to return the UTF-8 encoding

- Your database has utf8 as the default encoding; a SHOW CREATE DATABASE will the encoding

- Your table is using the utf8 encoding; a SHOW CREATE TABLE will show the encoding

- Your table columns are using the utf8 encoding; if your table is but your columns are not then a SHOW CREATE TABLE will show it

- Your database connection is using the utf8 encoding; for MySQL you have to pay attention to both the server and client settings

 

Missing any one of those can cause the problem you're seeing.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.