Jump to content

Utf-8 Collation


son
 Share

Recommended Posts

I have a from to upload data to a database. It has

header('Content-Type: text/html;charset=utf-8');mysql_set_charset($GLOBALS['DB'], 'utf8');

at the top.The database, the tables and fields are set toCollation: utf8_general_ciGerman special characters are stored for some reason as ASCII. ALthough they display fine on web pages: What else could be the reason that the database stores special characters as ASCII? What else could I check? I do not get it why it would do that and after research am at the end of my wisdom...Son

Link to comment
Share on other sites

Why is it a problem? The database doesn't necessarily store characters as ASCII, it just stores a string of bytes. The characters get messed up when something tries to parse that byte string as an ASCII string instead of a UTF string. It's still just a string of bytes though either way.

Link to comment
Share on other sites

Why is it a problem? The database doesn't necessarily store characters as ASCII, it just stores a string of bytes. The characters get messed up when something tries to parse that byte string as an ASCII string instead of a UTF string. It's still just a string of bytes though either way.
Even when it is not an issue, what else could be there to try to parse the string as ASCII? The page that holds form is set to UTF-8 and so is database, table and relevant table fields. I really do not get it what else could be in there?Son
Link to comment
Share on other sites

  • 3 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...