Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
PHP Databases Using PHP in conjunction with databases. PHP questions not specific to databases should be directed to one of the other PHP forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP Databases section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old May 28th, 2012, 08:38 AM
Authorized User
Points: 173, Level: 3
Points: 173, Level: 3 Points: 173, Level: 3 Points: 173, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2004
Location: , , .
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default Character code

Hi,

I have records in my MySQL database which are in Romanian, where such characters as ă, Ó, ‚, ș, ț appear. The database was created with the statement

Code:
CREATE DATABASE <db_name> DEFAULT CHARACTER SET utf8 COLLATE utf8_romanian_ci;
and, as you'd expect, there's no problem with the Romanian characters (e.g. in the MySQL utility).
However, in PHP generated HTML, I get rogue characters instead of the correct ones after a SELECT... query.

What can I do to get correct characters ?

On the Internet, someone suggested to have a "SET CHARACTER SET utf8;" directive before the query.
Well, it seemed to work for some queries (or the first in a row), but I still get rogue chars in a PHP script where I have multiple subsequent queries.


Thanks,

Mike
Reply With Quote
Reply


Thread Tools
Display Modes

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 Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Get Ascii code for a character in XSLT mswin XSLT 8 November 28th, 2008 07:21 AM
how do I convert character to utf hex code? mondayisgreat Classic ASP Basics 1 January 24th, 2008 12:48 PM
character entity into numeric character entity srkumar XSLT 1 November 22nd, 2007 03:53 AM
How to convert UTF8 code to character ghostnguyen C# 1 July 18th, 2005 05:28 AM
Decimal code for a special character mcinar HTML Code Clinic 14 February 4th, 2005 12:56 PM



All times are GMT -4. The time now is 11:14 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.