Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: phpMyAdmin : convcharset, utf8 and iso-8859-15
"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.
>
> 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.



Report this thread to moderator Post Follow-up to this message
Old Post
Jim Michaels
02-24-06 08:56 AM


Re: phpMyAdmin : convcharset, utf8 and iso-8859-15
"Jim Michaels" <NOSPAMFORjmichae3@yahoo.com> wrote in message
 news:zu2dnbK4KtPIPmPenZ2dneKdnZydnZ2d@co
mcast.com...
>
> "CapitaineEcarlate" <bonnepluie@free.fr> wrote in message
> news:43959b76$0$4344$626a54ce@news.free.fr... 

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.
 
>
> not in the manual.
> 
>
> 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.
>



Report this thread to moderator Post Follow-up to this message
Old Post
Jim Michaels
02-25-06 02:56 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP SQL archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 08:18 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.