![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I'm using mysql 4.0.18 on a web server with PHP 5.1.1 and I'm trying to pass from the iso-8859-1 encoding to utf8, but I'm still confused about many questions. With which encoding data is saved in the DB when data is generated by PHP? Does it depend to the charset of the php page? And if the string is inserted in a page by the user in a form and then inserted in the database? There is any setting of mysql, or any property of the db, of the table or of the field? Thank you, Carlo. |
#3
| |||
| |||
|
|
Carlo, MySQL stores whatever PHP (or any other program) tells it to store. It does not change the encoding of the data. The charsets are just used for collation (sorting) non-equal comparisons. |
#4
| |||
| |||
|
|
Il Sat, 22 Jul 2006 10:51:04 -0400, Jerry Stuckle ha scritto: Carlo, MySQL stores whatever PHP (or any other program) tells it to store. It does not change the encoding of the data. The charsets are just used for collation (sorting) non-equal comparisons. Ok, thanks, I think i understood.. Another question: so the data that is inserted in the DB has the encoding of the php page? Both if it comes directly from php code or from an input form? |
#5
| |||
| |||
|
|
There isn' treally a php page. There is an HTML page, which may be generated by php. What Jerry meant was that PHP or any other program passes a string of bits to MySQL and that it what MySQL stores. View that data through an interface that assumes different encoding and you will see different things. |
#6
| |||
| |||
|
|
Il Sat, 22 Jul 2006 22:18:07 +0100, Paul Lautman ha scritto: There isn' treally a php page. There is an HTML page, which may be generated by php. What Jerry meant was that PHP or any other program passes a string of bits to MySQL and that it what MySQL stores. View that data through an interface that assumes different encoding and you will see different things. Ok, but if i insert in a table, using a php application, some data taken from an input form, that data has the same encoding of the html page of the sending form or it depends also on some settings of the user's browser or os? Carlo. |
![]() |
| Thread Tools | |
| Display Modes | |
| |