Solved

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

Posted on 2006-06-17
4
562 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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

Suggested Solutions

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

685 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