ASCII key problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
satheshf12000
Forum Commoner
Posts: 25
Joined: Mon Sep 04, 2006 5:38 pm

ASCII key problem

Post by satheshf12000 »

Hello everyone,

I'm not sure what the problem is and whether this is the right place. When I click my page from my email (I am sending the links to my users actually), I am getting this value in between my text randomly '�'. See the attachment for you to understand better. But when I directly goto my web page, it works fine and that symbol doesn't appear at all. The URL is exactly the same. Any idea of what's happening here? Thanks in advance guys..

My website URL is http://www.tesscoinfra.com/properties.p ... 4&stat=eb4
Attachments
ASCII Key problem
ASCII Key problem
ascii_problem.jpg (84.98 KiB) Viewed 192 times
Last edited by satheshf12000 on Sun Jan 04, 2009 5:20 am, edited 1 time in total.
User avatar
sergio-pro
Forum Commoner
Posts: 88
Joined: Sat Dec 27, 2008 12:26 pm

Re: ASCII key problem

Post by sergio-pro »

Hi

You should have put your site url here, so that I wouldnt need to search it in google.

There is no charset definition on your page.
You should add the following to your html head :
<meta http-equiv="content-type" content="text/html; charset=Windows-1251" />

May be you will also need to put:
AddDefaultCharset Windows-1251
to your apache httpd.conf file
satheshf12000
Forum Commoner
Posts: 25
Joined: Mon Sep 04, 2006 5:38 pm

Re: ASCII key problem

Post by satheshf12000 »

sergio-pro wrote:Hi

You should have put your site url here, so that I wouldnt need to search it in google.

There is no charset definition on your page.
You should add the following to your html head :
<meta http-equiv="content-type" content="text/html; charset=Windows-1251" />

May be you will also need to put:
AddDefaultCharset Windows-1251
to your apache httpd.conf file
Thank you Sergio.. When I just placed that <meta> line, it's displaying properly now. But I don't really understand why it (weird question mark symbol) doesn't appear when I just go directly to my website. Anyways solved. Thanks again.. :D
User avatar
Apollo
Forum Regular
Posts: 794
Joined: Wed Apr 30, 2008 2:34 am

Re: ASCII key problem

Post by Apollo »

satheshf12000 wrote:But I don't really understand why it (weird question mark symbol) doesn't appear when I just go directly to my website.
Perhaps your browser auto-detected the encoding.

By the way, note that using windows-1251 codepage (or any ansi encoding for that matter) is usually not a good idea. For example, you can't (at least not without trickery) display regular chars with diacritics, such as à or é, which are quite common in most western languages.
Post Reply