Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 153
  • Last Modified:

Apache2 displays "?" instead of characters such as . ' or even - in selected cases.

Hi
I recently moved a couple of websites from Apache 1.3.x to Apache2.x

On some of the sites there are "posting" systems, where users copied text into a text area and then posted the content to the website.

Previously, it seems that users copied straight from MS Word documents (including formatting such as new lines, paragraphs and even bullets etc) and the display was in most cases fairly close to correct. I did see one or two "?" in the webpages for things that Apache could not recognise, however these characters always "converted" correctly   ' , : , - , . .
 Now, after the move to Apache2, many of the articles that previously displayed correctly, now have "?" in place of some full-stops, hyphens and bullets.

I've looked at the httpd.conf in the hope that by some accident the old Apache loaded a diferent/extra character set than the new Apache, but to my horror, Apache2 seems to have even more "support" for character sets than Apache 1.3.x, so it seems this is not the cause of the strange display.

Does anyone have similar experience and perhaps a workaraound? ( I'm not looking for a perfect "conversion" since I know well it is not possible to simply "copy & paste" a Word doc and retain all layout and functions; we have instructed the users NOT to copy & paste from Word, but to type the text by hand and use the formatting tools of the posting box to get things like Bold, Italics, bullets etc. but you know how users are, if they find a "shortcut" that partially works, they will use it, and then complain if it doesn't deliver perfect results...)

Thanks for any help.
 
0
psimation
Asked:
psimation
  • 2
1 Solution
 
da99rmdCommented:
Hi psimation,
what kind of locale do you have in the shell you are stating apache with or have set apache to in .conf.
UTF-8 or ISO-8859-* or something else strange ?

/Rob
0
 
psimationAuthor Commented:
HI da99rmd

How would I be able to check that?

To my knowledge, I have not specifically set anything. It's basically "out-of-the-box" installations with default options.

I did see those character sets as part of the list of (supported?) character sets inside httpd.conf, but from the listing, it doesn't seem like one of them is set as "default", I get the impression that they are just all "available"?

0
 
pwherryCommented:
Have a look at your httpd.conf file. Some installations (notably Fedora Core 2) set UTF-8 as the default character set, which will result in the problems you've described.

I'll bet you'll find a line that looks like this:

AddDefaultCharset UTF-8

Comment it out (# at the beginning of the line), then run "apachectl restart" and see if that resolves your problem.

Phil
0
 
psimationAuthor Commented:
Great stuff, thanks
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now