Solved

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

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

760 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now