Вопрос

In my form, i want to use a placeholder text for my textarea. It works fine except no turkish chars.

<form action="http://localhost:8082/kaybeden/index.php/details/newcomment" method="post" accept-charset="utf-8" class="form-horizontal">
<div class="control-group">
  <div class="controls">
    <textarea name="comment_body" cols="150" rows="10" id="comment_body" placeholder="yazd���n yorum zeka bar�nd�rs�n." ></textarea>
  </div>
</div>
<div class="control-group">
  <div class="controls">
    <input type="submit" name="submit" value="Yolla" class="btn" />
  </div>
</div>

"yazd���n yorum zeka bar�nd�rs�n" string is the output, normally it should be "yazdığın yorum zeka barındırsın.". My HTML charset is UTF-8. All the turkish chars are fine except placeholder.

Это было полезно?

Решение

This

placeholder="yazd���n yorum zeka bar�nd�rs�n."

is indicative of non-UTF-8 characters entered in a UTF-8 context.

Make sure in your text editor or IDE that your HTML file is properly UTF-8 encoded.

Другие советы

Use the HTML entity codes (On the website it is called numerical code) instead of the real characters. You can find a table here

For example:

<input type="text" placeholder="Kushadas&#305;"/>

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top