Reply to Re: utf8

Your name:

Reply:


Posted by Willem Bogaerts on 02/23/07 08:09

> I'm running php5 and mysql5, both configured for utf8... When I save
> data into a table, and look at the table with e.g. phpmyadmin, the
> data
> has weird characters like: è and é in it.Actually this isn't a
> big problem: when I print the data in my browser, the accents look
> fine.
<snip>

I have burned my fingers a lot with encodings, lately. The problem is
that texts do have encodings, while strings do not. And off course, that
texts are stored as strings.

what you are seeing is utf-8, but shown as if it was latin-1 (or a
derivative). The reverse shows question marks, as most special
characters in latin-1 are not well formed utf-8.

I installed phpMyAdmin as well, because the site and the browser are now
working together just fine (IE and Firefox, at least), So any text gets
entered in utf-8 in the database and rendered the same as it was
entered. My hope was that phpMyAdmin would enable me to enter strings
directly into the database, as it is running inside a browser also. Bad
luck. Both phpMyAdmin and my regular database frontend show utf-8 as if
it is latin-1.

There is a lot that can go wrong:
- Your OS has an encoding
- The frontend program may have an encoding
- The database connection has an encoding
- The field has an encoding

There may be conversions at any point, but mostly texts are not
converted and I do not understand why you can give an encoding if it is
never used anyway.

Alas, there is no "unicode escape" either in MySQL (like "/Uxxxx" in
some languages). So it is impossible to store a query in a file, upload
it to another OS and have the encoding automagically set right. Some
encoding solutions are really laughable. Do you think that "SET NAMES
utf16le" will ever be executed? Only if it is a lie and NOT issued in
such an illegible encoding.

I am sorry that this is not very helpful, but I think I just need a
shoulder to cry on.

Wèèèèèèèèèèè !

--
Willem Bogaerts

Application smith
Kratz B.V.
http://www.kratz.nl/

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация