Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am developing a PHP Application that needs to display and accept content written in tamil. For example "login" should be written in tamil on the form.

How can I achieve this ?

share|improve this question
what have you tried? – gnat Mar 28 '13 at 6:43
possible duplicate of Strategy for website with international strings – gnat Mar 28 '13 at 6:58

If you want to display tamil characters on a web page, be it in PHP or any other web technology, you have to indicate to the browser that the page is written in UTF-8.

Also, "how to create web sites in indian languages?" might help you as it gives why and how you have to do it.

In short:

  1. Make sure to save your PHP file in UTF-8.
  2. Indicate to the browser that the page should be viewed in UTF-8 by adding the following meta to the page: <meta http-equiv=Content-Type content="text/html; charset=utf-8">
  3. You have to configure your web application to serve UTF-8 content. As such, The HTTP Content-Type header should look like so: Content-Type: text/html; charset=utf-8

I'm not a PHP programmer at all, but you should check out How to display unicode data in PHP, this should help you a lot.

share|improve this answer
To put it more generally - any encoding that encodes a character set that contains the characters to be used. For tamil UTF-8/16/32 or TSCII. UTF-8 is the most practical of course. – Esailija Mar 27 '13 at 19:08
very good point! – Jalayn Mar 27 '13 at 19:13
Great answer. Also, your database must be set up to use UTF-8. Some details that may help: – GlenPeterson May 15 '13 at 12:58

Save the files in UTF-8 if using a editor like Editplus or eclipse you can google how to

Use a multipart form with UTF encoding

In your persistance / data base layer set up the tables to accept UTF-8 and your good to go. If using My SQL its usually on by default for varchar

share|improve this answer
oh yeah : Content-Type: text/html; charset=utf-8 is very important. – tgkprog Mar 27 '13 at 20:31
* we had to save all files includes etc in UTF-8 too. – tgkprog Mar 27 '13 at 20:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.