/    Sign up×
Community /Pin to ProfileBookmark

Character encoding

I’m replicating a client’s setup on my local machine. Their live site is Greek, and displays fine in my browser with its Greek characters, but my local copy outputs question marks in place of any occurence of Greek characters.

Sending “Content-Type: text/html; charset=iso-8859-7” via the header() function does not alleviate the problem. I’ve similarly tried AddCharset and AddDefaultCharset in .htaccess/httpd.conf with no results. I can also confirm the data itself was imported correctly, as the characters display fine in MySQL Administrator and phpMyAdmin.

Can anyone help?

to post a comment
PHP

4 Comments(s)

Copy linkTweet thisAlerts:
@scragarAug 02.2008 — have you set the right meta tag as well? It's the only other thing I could imagine causing a problem:
<meta http-equiv="content-type"
content="text/html; charset=iso-8859-7" />
Copy linkTweet thisAlerts:
@flardauthorAug 03.2008 — Yes, the contents of that meta tag is identical to the header sent. It's a really strange issue.

Any other ideas?
Copy linkTweet thisAlerts:
@flardauthorAug 03.2008 — Bumping this as quite urgent...can anyone shed any light on the matter?
Copy linkTweet thisAlerts:
@callumdAug 03.2008 — You need to ensure the page was encoded with [i]iso-8859-7[/i]. Simply putting that in the meta tag doesn't make it so.

Open the HTML files in a HTML editor, and there will be an option somewhere of "character set" or "encoding type". Make sure it is set to [i]iso-8859-7[/i] before you save it.

As long as you then use the meta tag that scragar showed, you should be ok, [i]unless[/i] your local machine does not have the [i]iso-8859-7[/i] character set installed.
×

Success!

Help @flard spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...