473,382 Members | 1,786 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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
Nov 10 '05 #1
2 1714
Piotr Usewicz <pi***@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
--
Nov 10 '05 #2
Ja NE napisa³(a):
Piotr Usewicz <pi***@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'");

Thanks, i'll see whether it works or not ;]
Nov 11 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: lawrence | last post by:
Someone on www.php.net suggested using a seems_utf8() method to test text for UTF-8 character encoding but didn't specify how to write such a method. Can anyone suggest a test that might work?...
38
by: Haines Brown | last post by:
I'm having trouble finding the character entity for the French abbreviation for "number" (capital N followed by a small supercript o, period). My references are not listing it. Where would I...
32
by: Wolfgang Draxinger | last post by:
I understand that it is perfectly possible to store UTF-8 strings in a std::string, however doing so can cause some implicaions. E.g. you can't count the amount of characters by length() | size()....
6
by: archana | last post by:
Hi all, can someone tell me difference between unicode and utf 8 or utf 18 and which one is supporting more character set. whic i should use to support character ucs-2. I want to use ucs-2...
7
by: Jimmy Shaw | last post by:
Hi everybody, Is there any SIMPLE way to convert from UTF-16 to UTF-32? I may be mixed up, but is it possible that all UTF-16 "code points" that are 16 bits long appear just the same in UTF-32,...
1
by: sheldon.regular | last post by:
I am new to unicode so please bear with my stupidity. I am doing the following in a Python IDE called Wing with Python 23. äöü äöü '\xc3\xa4\xc3\xb6\xc3\xbc' u'\xe4\xf6\xfc'...
10
by: Jed | last post by:
I have a form that needs to handle international characters withing the UTF-8 character set. I have tried all the recommended strategies for getting utf-8 characters from form input to email...
23
by: Allan Ebdrup | last post by:
I hava an ajax web application where i hvae problems with UTF-8 encoding oc chineese chars. My Ajax webapplication runs in a HTML page that is UTF-8 Encoded. I copy and paste some chineese chars...
35
by: Bjoern Hoehrmann | last post by:
Hi, For a free software project, I had to write a routine that, given a Unicode scalar value U+0000 - U+10FFFF, returns an integer that holds the UTF-8 encoded form of it, for example, U+00F6...
4
by: =?ISO-8859-2?Q?Boris_Du=B9ek?= | last post by:
Hi, I have an API that returns UTF-8 encoded strings. I have a utf8 codevt facet available to do the conversion from UTF-8 to wchar_t encoding defined by the platform. I have no trouble...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.