TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 11-21-2007, 02:58 AM   #1 (permalink)
The Contributor
 
aristoworks's Avatar
 
Join Date: Nov 2007
Location: Nashville
Posts: 44
Thanks: 7
aristoworks is on a distinguished road
Default International Character Support

I'm developing a back-end for a simple product but have been asked to be forward thinking about supporting international character storage.

I'm not too familiar with anything outside of simple character encoding issues so I was hoping someone could lend some insight as per what would be my best choice for storing data in MySQL.

I'm leaning towards utf8_bin.

I really appreciate any comments.

jw
Send a message via AIM to aristoworks
aristoworks is offline  
Reply With Quote
Old 11-21-2007, 09:55 PM   #2 (permalink)
The Acquainted
 
wGEric's Avatar
 
Join Date: Nov 2007
Posts: 166
Thanks: 0
wGEric is on a distinguished road
Default

phpBB3 uses utf8_bin and that works great for them. They've had to do lots to get UTF-8 working properly in PHP though.
__________________
Eric
wGEric is offline  
Reply With Quote
Old 11-22-2007, 10:51 PM   #3 (permalink)
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,258
Thanks: 90
Wildhoney is on a distinguished road
Default

I've had no problems with UTF-8 either when doing this. However, Bluesaga is probably the best man to ask about this.
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote
Old 11-22-2007, 11:02 PM   #4 (permalink)
Super Moderator
Advanced Programmer 
 
bluesaga's Avatar
 
Join Date: Sep 2007
Posts: 165
Thanks: 0
bluesaga is on a distinguished road
Default

utf8_general_ci is what you want to use, utf8_bin is binary......

However there is PHP specific issues with utf-8, being erradicated in PHP 6 but definitely there is some. Also if you are scraping information, you do need to check content type and change it.

However if you just want functions to work with php, check the mbstring extension and if you are using preg functions you need to make them Unicode compatible.
__________________
Halo 3 Cheats
bluesaga is offline  
Reply With Quote
Old 11-29-2007, 09:36 PM   #5 (permalink)
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,258
Thanks: 90
Wildhoney is on a distinguished road
Default

The 2 key functions that you'll probably wish to look at from the mbstring module are the following:

These will get you off to a good start.
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

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

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


All times are GMT. The time now is 07:49 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design