|
-
May 13th, 2008, 09:24 AM
#1
Thread Starter
Addicted Member
[RESOLVED] mysql_result issue (I think)
Hi all!
I've got names in latin stored on mysql so when I try to retrieve them using mysql_result to display them using a combobox (<select>), in comes scrambled. For instance, "María Peña" shows like "MaraPea".
Any ideas?
BTW, it looks just fine inside the tables...
The biggest man you ever did see was once just a baby.
Bob Marley
-
May 13th, 2008, 11:13 AM
#2
Addicted Member
Re: mysql_result issue (I think)
What is the charset used for the page containing the select box. I mean the meta tag <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
I guess it has something to do with the parameter you give for charset.
-
May 13th, 2008, 11:26 AM
#3
Thread Starter
Addicted Member
Re: mysql_result issue (I think)
Code:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
The biggest man you ever did see was once just a baby.
Bob Marley
-
May 13th, 2008, 11:36 AM
#4
Addicted Member
Re: mysql_result issue (I think)
I believe it has something to do with the charset thing, but I am not sure which charset to use. Try charset=iso-8859-1.
-
May 13th, 2008, 11:46 AM
#5
Thread Starter
Addicted Member
Re: mysql_result issue (I think)
Didn't work. How many charset re there?
The biggest man you ever did see was once just a baby.
Bob Marley
-
May 13th, 2008, 08:46 PM
#6
Re: mysql_result issue (I think)
Use mysql_set_charset to specify the connection character set to match that used by the table.
The manual page has alternative functions if you're using an older version of PHP.
-
May 14th, 2008, 07:25 AM
#7
Thread Starter
Addicted Member
Re: mysql_result issue (I think)
I had to redefine the tables and tell MySQL to use utf8 as charset, then use the utf8_encode() function to display the data the way I want it. Thanks anyway!!!
Last edited by _Yoyo; May 19th, 2008 at 12:07 PM.
The biggest man you ever did see was once just a baby.
Bob Marley
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|