Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Problems saving to a DB the pound symbol and the persian text
Old 10-23-2010, 04:30 PM Problems saving to a DB the pound symbol and the persian text
lynxus's Avatar
Awesomeo-Maximo

Posts: 1,618
Location: UK
Trades: 1
Hi Guys,
I have a VERY annoying issue with IE
It works fine in firefox and google chrome.

I have a form that you submit text into.
This then calls a send.php file and that sends it to the DB

I then have a page that reads the DB and displays the text.
HOWEVER in IE if i send the pound symbol (£) i displays as � in IE.

The same goes for persian text like: لينوكس دلخواه قابل نصب بوده لينوكس

this saves as some random text and displays as : �������������

The DB is set to utf-8 unicode ci
The documents are set to utf8 also.

I just cant see why... I have this set: and yet STILL! Internet explorer just doesnt handle it properly.

<?php header("Content-type: text/html; charset=utf-8");?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />


Please anyone have any idea whats wrong here?

its fine in ANY other browser.
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE


lynxus is offline
Reply With Quote
View Public Profile Visit lynxus's homepage!
 
 
Register now for full access!
Old 10-23-2010, 04:40 PM Re: Problems saving to a DB the pound symbol and the persian text
lynxus's Avatar
Awesomeo-Maximo

Posts: 1,618
Location: UK
Trades: 1
Typical,
After HOURS!!!!
of looking, Ive found the issue.

In IE when using utf-8 and ajax you need:

message = encodeURIComponent(message);

This appears to fix it completely.
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE


lynxus is offline
Reply With Quote
View Public Profile Visit lynxus's homepage!
 
Old 10-23-2010, 06:36 PM Re: Problems saving to a DB the pound symbol and the persian text
Ultra Talker

Posts: 366
Name: Steve
Location: Miami, FL, Earth
Trades: 0
Glad you found the answer... was going to say it sounded like an IE issue and not a DB issue.
__________________
- Steve

President,
Please login or register to view this content. Registration is FREE
smoseley is offline
Reply With Quote
View Public Profile Visit smoseley's homepage!
 
Reply     « Reply to Problems saving to a DB the pound symbol and the persian text
 

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.65302 seconds with 12 queries