Solved

Apache dislpays "��" for characters such as >> or '

Posted on 2006-06-17
4
557 Views
Last Modified: 2009-12-16
Hi
I have Apache 2.0.52 running on CentOs 4.3. When i put a website that runs prefectly on Apache 1.3.x onto this box, some pages have  �� characters instead of things like single quotes etc.

Can anyone help please?

0
Comment
Question by:psimation
4 Comments
 
LVL 17

Author Comment

by:psimation
ID: 16927246
PS, the characters looks like ? inside a diamond shape.
0
 
LVL 37

Accepted Solution

by:
Harisha M G earned 40 total points
ID: 16927327
Hi, they are unsupported (probably Unicode) characters.

Instead of 65533, you can try different codes.. for ex, A will display "A"


---
Harish
0
 
LVL 51

Assisted Solution

by:ahoffmann
ahoffmann earned 40 total points
ID: 16929014
looks like a unicode character, either use a browser which understands that by default, or use a proper meta character-set tag in your page
0
 
LVL 22

Assisted Solution

by:pjedmond
pjedmond earned 45 total points
ID: 16929348
In your /etc/httpd/conf/httpd.conf

you will find a number of lines that include:

Addcharset.

Mine is:

---------8X-----------------------
AddCharset ISO-8859-1  .iso8859-1  .latin1
AddCharset ISO-8859-2  .iso8859-2  .latin2 .cen
AddCharset ISO-8859-3  .iso8859-3  .latin3
AddCharset ISO-8859-4  .iso8859-4  .latin4
AddCharset ISO-8859-5  .iso8859-5  .latin5 .cyr .iso-ru
AddCharset ISO-8859-6  .iso8859-6  .latin6 .arb
AddCharset ISO-8859-7  .iso8859-7  .latin7 .grk
AddCharset ISO-8859-8  .iso8859-8  .latin8 .heb
AddCharset ISO-8859-9  .iso8859-9  .latin9 .trk
AddCharset ISO-2022-JP .iso2022-jp .jis
AddCharset ISO-2022-KR .iso2022-kr .kis
AddCharset ISO-2022-CN .iso2022-cn .cis
AddCharset Big5        .Big5       .big5
# For russian, more than one charset is used (depends on client, mostly):
AddCharset WINDOWS-1251 .cp-1251   .win-1251
AddCharset CP866       .cp866
AddCharset KOI8-r      .koi8-r .koi8-ru
AddCharset KOI8-ru     .koi8-uk .ua
AddCharset ISO-10646-UCS-2 .ucs2
AddCharset ISO-10646-UCS-4 .ucs4
AddCharset UTF-8       .utf8

# The set below does not map to a specific (iso) standard
# but works on a fairly wide range of browsers. Note that
# capitalization actually matters (it should not, but it
# does for some browsers).
#
# See http://www.iana.org/assignments/character-sets
# for a list of sorts. But browsers support few.
#
AddCharset GB2312      .gb2312 .gb
AddCharset utf-7       .utf7
AddCharset utf-8       .utf8
AddCharset big5        .big5 .b5
AddCharset EUC-TW      .euc-tw
AddCharset EUC-JP      .euc-jp
AddCharset EUC-KR      .euc-kr
AddCharset shift_jis   .sjis

-----------------------8X------------------------------

You may need to add an extra 'AddCharSet for the pages concerned.

Next you need to have a look at the source code of the page concerned. In the <head></head> section of a properly W3C validated page, you will have something like this:

<head>
<title>MY PAGE</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta http-equiv="Content-Language" content="en-us">
<style type="text/css" media="all">@import "./faststyle.css";</style>
</head>

Note the charset metatag! This particular charset is (as near as dammit) iso-8859-1, and is treated as such. Here for a bigger list:

http://www.w3.org/International/O-charset-lang.html

Look here for a list of the chars available:

http://code.cside.com/3rdpage/windows/western.html

You will see your ? in a diamond (used when an non valid char is attempted, and also see your puctuation marks.

You may also be able to solve the problem by specifying the appropriate char set in your web-page.

HTH:)
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Determine Who is Runnig my Bash Shell Script 4 79
Virtualizing very old guest OS 4 95
add some character at the end of line in vi 7 78
cannot rename datastore 3 45
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question