Connecting Tech Pros Worldwide Help | Site Map

UTF-8 Problem

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 10th, 2005, 05:15 PM
Piotr Usewicz
Guest
 
Posts: n/a
Default UTF-8 Problem

Hi...

I've got a silly problem. I'm using a MySQL 4.1 with UTF-8 charset.
phpMyAdmin with UTF-8 charset aswell. The problem is when I enter data
in phpMyAdmin or any other MySQL tool, I can't see non standard letter
in my app. But when I enter data in my app i can't see thos chars in
let's say phpMyAdmin. Notice that my app is UTF-8 aswell... Any ideas
what's wrong? (PHP 5.0.3)

TIA
Piotr Usewicz

  #2  
Old November 10th, 2005, 10:25 PM
Ja NE
Guest
 
Posts: n/a
Default Re: UTF-8 Problem

Piotr Usewicz <piotr@layer22.com> wrote:
[color=blue]
> Hi...
>
> I've got a silly problem. I'm using a MySQL 4.1 with UTF-8 charset.
> phpMyAdmin with UTF-8 charset aswell. The problem is when I enter data
> in phpMyAdmin or any other MySQL tool, I can't see non standard letter
> in my app. But when I enter data in my app i can't see thos chars in
> let's say phpMyAdmin. Notice that my app is UTF-8 aswell... Any ideas
> what's wrong? (PHP 5.0.3)
>[/color]

I had simmilar problem and have solved it with just one line after
database connection:

mysql_pconnect($hostname, $username, $password)
mysql_select_db($database)

add this line:

mysql_query("SET NAMES 'utf8'");


--
Ja NE
http://fotozine.org/?omen=janimir
--
  #3  
Old November 11th, 2005, 11:05 AM
Piotr Usewicz
Guest
 
Posts: n/a
Default Re: UTF-8 Problem

Ja NE napisał(a):[color=blue]
> Piotr Usewicz <piotr@layer22.com> wrote:
>
>[color=green]
>>Hi...
>>
>> I've got a silly problem. I'm using a MySQL 4.1 with UTF-8 charset.
>>phpMyAdmin with UTF-8 charset aswell. The problem is when I enter data
>>in phpMyAdmin or any other MySQL tool, I can't see non standard letter
>>in my app. But when I enter data in my app i can't see thos chars in
>>let's say phpMyAdmin. Notice that my app is UTF-8 aswell... Any ideas
>>what's wrong? (PHP 5.0.3)
>>[/color]
>
>
> I had simmilar problem and have solved it with just one line after
> database connection:
>
> mysql_pconnect($hostname, $username, $password)
> mysql_select_db($database)
>
> add this line:
>
> mysql_query("SET NAMES 'utf8'");
>
>[/color]
Thanks, i'll see whether it works or not ;]
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.