Jump to content

[SOLVED] Problem with Greek characters in PHP


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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.