0

I have made a form to store some information in database instead of executing query each time. The input is non-English font, Bengali in this case. I have used the following code for taking input:

<textarea name="content" id="content" rows="20" cols="50" accept-charset="UTF-8">

As not Latin font I have used the accept-charset="UTF-8" part to store data. but it doesn't work. I have also tried applying the portion in form tag like this:

<form name="submit_form" id="submit_form" method="post" accept-charset="UTF-8">

But whenever I post something from the form there are garbage value like

খন আসমà§

What could be the problem? I have also specified utf-8 in charset for database. I am using codeigniter framework.

codelearner
  • 45
  • 1
  • 8
  • Are you *looking* at it in something that can properly *display* UTF-8? – Sammitch Sep 25 '17 at 17:09
  • When I post anything from the textarea the garbage value above is being inserted in database. It seems to me a font problem so I used the utf8. – codelearner Sep 25 '17 at 18:50
  • That "garbage" is what UTF-8 data looks like when viewed as ISO8859-1. You should look up the definition of [character sets](https://en.wikipedia.org/wiki/Character_encoding) and the [difference between UTF8 and ISO8859](https://stackoverflow.com/questions/7048745/what-is-the-difference-between-utf-8-and-iso-8859-1/39109074#39109074). – Sammitch Sep 25 '17 at 19:06

0 Answers0