Reply to Re: UTF-8 Problem

Your name:

Reply:


Posted by Ja NE on 11/11/05 01:18

Piotr Usewicz <piotr@layer22.com> wrote:

> 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)
>

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
--

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация