|
Posted by Jim Michaels on 02/25/06 01:36
"Jim Michaels" <NOSPAMFORjmichae3@yahoo.com> wrote in message
news:zu2dnbK4KtPIPmPenZ2dneKdnZydnZ2d@comcast.com...
>
> "CapitaineEcarlate" <bonnepluie@free.fr> wrote in message
> news:43959b76$0$4344$626a54ce@news.free.fr...
>> Hy,
>>
>> My website is hosted by Free.fr which offers MySQL control via phpMyAdmin
>> 2.6.3-pl1. That's great, but i have a little problem.
>>
>> To follow the current stream and because my website is intended to be in
>> several languages, i decided to use utf8 encoding instead of iso-8859-15.
>> Everything works fine : the tables are in utf8, and PHP handle it... But,
>> phpMyAdmin seems to systematically convert data from the Insert forms in
>> iso-8859-1 before the table to be fed. I foud in the source of the Insert
>> page :
>> <input type="hidden" name="convcharset" value="iso-8859-1" />
>> And, all text data is actually stored as iso instead of utf8.
>>
>> If i do my own form to feed the table with correct utf8 data, i don't
>> encounter any problem. If i use the utf8_encode() PHP function, it fixes
>> the problem too. But... i'd like to feed the table with the help of
>> phpMyAdmin, but in true utf8.
>>
>> Note that Free.fr offers MySQL 4.1.13.
in PHPMyAdmin you can set the collation (charset), but you are limited to
what tthe database can handle. you can set a specific language, but that
doesn't include utf-8. I looked in MySQL's share directory.
>>
>> Any idea ?
>> Do you know if it is an option of phpMyAdmin ?
>
> not in the manual.
>
>> Thanks !
>>
>> CapitaineEcarlate
>
> Maybe I am not the one to be speaking (since I haven't looked inside
> phpMyAdmin), but I don't think the problem is phpMyAdmin. utf-8 is a
> binary stream. so the fields you use with it should be MySQL types like
> VARBINARY() or BLOB() or TINYBLOB or MEDIUMBLOB.
> as binary data, it should be hexcoded, or at least fed through
> addslashes() before it ends up being fed to the db, or use the mysqli
> functions [including mysqli_prepare()] and variable binding. I don't know
> what will happen if a utf-8 stream ends up in SQL statements as table
> names. There is a chance one of those bytes might happen to be a quote
> character. SQL is ANSI, not utf-8 coded.
>
> The problem you are having is not how do I put utf-8 text in, but instead,
> how do I put a binary stream of data into a text field in phpMyAdmin. The
> answer is, of course, you do a workaround. phpMyAdmin's text fields were
> made to work with text, not binary data such as utf-8. that's the area
> you are going to have to modify of course.
>
Navigation:
[Reply to this message]
|