Portuguese character set on Apache
October 9, 2008 9:00 PM
Subscribe
I need to display Portuguese characters on a webpage, but when I upload the files to the Apache server, they stop displaying correctly. And, yes, I'm using UTF-8 encoding.
I've been provided with a number of HTML pages with Portuguese characters on them. If I look at the files on my (Windows) desktop machine, they look fine, but once I upload them to the (Ubuntu 7.04) web server, they're replaced with those annoying question mark characters.
I've done some digging around, and have found that if I copy/paste the chars into a new file, and then request it, they display just fine; it seems the act of SCPing the file up to the server screws them up (either that or pasting the text fixes them up).
If I strip it right back to a single word file (containing "Você" -- that last character is ASCII #234), and compare the ASCII codes of the characters contained there in, I get the following:
- this one displays correctly in one's browser (i.e. was the copy/paste effort):
V => 86
o => 111
c => 99
à => 195
ª => 170
- but this one doesn't (i.e. SCPed) despite the ASCII code being correct:
V => 86
o => 111
c => 99
ê => 234
If necessary I'll write a perl script to translate the character combos to the correct HTML entities but I'd rather not. Is there some sly way I can get this to work?
posted by John Shaft to computers & internet (11 comments total)
2 users marked this as a favorite
posted by exphysicist345 at 9:26 PM on October 9, 2008