UK WEB HOSTING FORUM FOR DISCUSSION ON WEB HOSTING SERVICE AND SUPPORT
LINUX HOSTING WINDOWS HOSTING PACKAGES SHOPPING CART OSCOMMERCE ZEN CART AGORA
ECOMMERCE HOSTING ASP MSSQL FRONTPAGE HOSTING PHP MYSQL HOSTING DISCUSSION FORUM
CPANEL RESELLER HOSTING DEDICATED SERVER VPS HOSTING PLESK VIRTUOZZO
Quick Search
Your forum announcement here!

  UK Web Hosting | Dedicated Server Windows and Linux VPS Forum > Web Hosting and Domains > PHP Hosting

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 17-12-2007, 16:57
borninblood's Avatar
Premium Member
 
Join Date: May 2007
Posts: 106
Default Not sure where the problem lies

Hey all,

I have a rather odd problem, and I am not 100% where it lies, but I assume it is either in my PHP or MySQL.

Basically any accented characters, and even most apostrophes that have been taken from a database table will appear on screen as question marks (?)

If I look at things in phpMyAdmin they look fine and I am just using a normal echo statement to output everything (something with nl2br thrown in as well).

Any ideas?

It started happening when I took a complete copy of one database and started running the web site hosting off it instead of the old one, but when I look at things like character encoding they are all identical.
__________________
BornInBlood (Metal) || SimplyTied (Bondage)
Reply With Quote
  #2 (permalink)  
Old 17-12-2007, 17:12
WelshTom's Avatar
Moderator
 
Join Date: May 2007
Location: Newport, Wales
Posts: 820
Send a message via AIM to WelshTom Send a message via MSN to WelshTom Send a message via Yahoo to WelshTom
Default

Hello

Please see http://www.w3schools.com/html/html_entities.asp
__________________
Thomas Williams
Founder of TWR Web Design
http://www.twrwebdesign.co.uk/
Reply With Quote
  #3 (permalink)  
Old 17-12-2007, 17:17
borninblood's Avatar
Premium Member
 
Join Date: May 2007
Posts: 106
Default

Hey Thomas,

Cheers, but surely there is another option, because that would mean that everytime someone posts ¥ - there needs to be an algorithm that translates the unicode into the entity number?

I mean it used to work fine with any characters, it is only recently that it is displaying them as "?" in all cases.
__________________
BornInBlood (Metal) || SimplyTied (Bondage)
Reply With Quote
  #4 (permalink)  
Old 17-12-2007, 17:19
WelshTom's Avatar
Moderator
 
Join Date: May 2007
Location: Newport, Wales
Posts: 820
Send a message via AIM to WelshTom Send a message via MSN to WelshTom Send a message via Yahoo to WelshTom
Default

Quote:
Originally Posted by borninblood View Post
Hey Thomas,

Cheers, but surely there is another option, because that would mean that everytime someone posts ¥ - there needs to be an algorithm that translates the unicode into the entity number?

I mean it used to work fine with any characters, it is only recently that it is displaying them as "?" in all cases.
Not really, even if it was working previously, you'll find it wouldn't have worked on some computers or web browsers, and that the entity needs to be used instead - using entities has been the acceptable way of displaying symbols for quite a long time. Simply copying symbols is very unlikely to work.
__________________
Thomas Williams
Founder of TWR Web Design
http://www.twrwebdesign.co.uk/
Reply With Quote
  #5 (permalink)  
Old 17-12-2007, 17:24
borninblood's Avatar
Premium Member
 
Join Date: May 2007
Posts: 106
Default

Hmm, I suppose so!

Next question then - is there a php function that will change any character into the correct entity code, so that when I use my input form, any special characters will be changed automatically?

Cheers in advance!
__________________
BornInBlood (Metal) || SimplyTied (Bondage)
Reply With Quote
  #6 (permalink)  
Old 17-12-2007, 18:33
WelshTom's Avatar
Moderator
 
Join Date: May 2007
Location: Newport, Wales
Posts: 820
Send a message via AIM to WelshTom Send a message via MSN to WelshTom Send a message via Yahoo to WelshTom
Default

I'm not sure to be honest, but I can suggest a very good editor which will do just that.

http://www.fckeditor.net/ is very flexible, and is easily integrated with other software.



Hope this helps...
__________________
Thomas Williams
Founder of TWR Web Design
http://www.twrwebdesign.co.uk/
Reply With Quote
  #7 (permalink)  
Old 18-12-2007, 10:58
mephisto's Avatar
Senior Member
 
Join Date: Feb 2007
Location: Darlington
Posts: 101
Send a message via ICQ to mephisto Send a message via MSN to mephisto
Default

You should have a look at PHP's multi byte string support. http://uk.php.net/mbstring

They may be able to help you
Reply With Quote
  #8 (permalink)  
Old 19-12-2007, 07:51
borninblood's Avatar
Premium Member
 
Join Date: May 2007
Posts: 106
Default

Cheers both of you!
__________________
BornInBlood (Metal) || SimplyTied (Bondage)
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

BB 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 14:51.

 

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by Web Hosting 3.1.0
Copyright © 2001-2008, eUKhost.com. All rights reserved.

 
Site Map

VPS Hosting
VPS Hosting plans

Dedicated Server Hosting
Dedicated Server plans

Business Web Hosting
100% uptime Hosting

Cpanel Hosting
cPanel Shared Hosting

Reseller Hosting
Reseller Web Hosting

Windows Hosting
Windows Shared Hosting

Windows VPS

Windows VPS Hosting

Semi Dedicated Servers
Semi-Dedicated Hosting

Dedicated Server Mirroring
Dedicated Server Mirroring

Webhosting Knowledgebase
Frequently asked Questions

Web Hosting Blog
eUKhost Blog

Web Hosting Support
Support Helpdesk

UK Data Center
eUKhost Datacenter

Web Hosting Forum
eUKhost Forum

Support Tutorials
Online Flash Tutorials

Offsite Back-up Plans
Remote Backup Service

Customer Testimonials
eUK Customer Testimonials


knowledgebase articles

eUKhost.com Services

Pre-Sales Questions
Pre-sales FAQ's

Domain Names
Domain registration FAQ's

cPanel Hosting
cPanel Hosting FAQ's

Windows Web Hosting
Plesk Control Panel

Reseller Hosting
Reseller Hosting FAQ's

VPS Hosting
Virtual Private Server

Semi-Dedicated Servers
Semi-Dedicated FAQ's

Dedicated Servers
Dedicated Server Hosting


popular blog categories


Web Hosting
Website Hosting articles

UK Web Hosting
UK Hosting articles

Dedicated Server Hosting
Dedicated Server guidelines

VPS Hosting
VPS hosting articles

cPanel Hosting
cPanel Hosting articles

Linux Operating System
Linux Operating techniques

Windows Web Hosting
Windows plesk articles