Jump to content

[SOLVED] Problem with Greek characters in PHP


timski72

Recommended Posts

Hello everyone.

 

I want to write a script that will transcribe a Greek word into the Latin alphabet, so users who can't read the Greek alphabet will have some idea of how the word is pronounced.

 

For example, a user might enter the Greek word "Καλημέρα" into a form, click on the "Transcribe" button and it will return "kalee mera".

 

Putting it rather too simply, but so you understand what I'm trying to achieve, most sounds of the Greek alphabet map to a sound of the Latin alphabet. E.g. "β" sounds like "v" so I map accordingly. Π sounds like "p", "ξ" sounds like "kse" etc.

 

I did this before in C# express, but when I tried to reproduce this script in PHP I came across a problem. I noticed that I was getting gibberish from the word entered in the form, i.e. in the $_POST['greek']. Php obviously doesn't like unicode. I had a look on the web and there is a lot of discussion about PHP not fully supporting PHP until version 6. Being a novice, I found some of the discussion a bit overwhelming, so before embarking on what might be an impossible mission, I thought I'd ask some advice first.

 

 

So, first and foremost, is it possible, or am I wasting my time? Second, is anyone able to give me any pointers?

 

My current host has PHP 5.25 running.

 

I have tried adding the following to the html as one post did suggest this might solve the problem, at least I think that's what they were suggesting ;-)

<meta http-equiv=”Content-Language” content=”bn”>

<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ >

 

Any advice would be much appreciated :-)

Cheers,

Tim.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.