Problems to display utf-8 charset in form-field of type: <input type="text"..>

From: Tore Krudtaa (
Date: Wed Oct 09 2002 - 10:10:42 EDT

  • Next message: Lars Marius Garshol: "Re: List Information"

    I'm developing a site for multiple language support.

    Have found one strange beaviour when using the UTF-8

    When displaying or just pasting i.e. Romanian into an
    form-field (HTML-page) of type
    <input type="text" value="Romanian text">
    then the characters are not displayed correctly.

    However when the same text is displayed in a field of
    type <textarea....>Romanian text</textarea> or field
    of type like <select.... > it works great.

    Have tried to find a reason and a workaround for about
    a week now but I find nothing and I do not get any
    respond from forums on the net regarding this either.

    Do you know why it is so and eventually a workaround
    for it or a fix.

    Tested this on IE 5.0 on Window(now), but are developing for use in IE 4+,
    Nescape 4+ and Opera 6+.

    Here is sample code in my HTML-page that display the
    Romanian text bad and good.

    Here is charset setting:
    <META http-equiv="Content-Type" content="text/html;

    This field type does not work, shows only garbage
    <input type="text" name="txtInfTitle" value="<? echo
    $curInfTitle; ?>" size="50">

    This field type works great:
    <textarea rows="1" name="txtInfTitle" cols="20"
    wrap="OFF"><? echo $curInfTitle; ?></textarea>

    I have copied some romanian text from a multilingual
    text HTML page using UTF-8 encoding.

    Then I pasted that text into the two field-types
    described above. Textarea field shows text correct,
    input field type does not.

    Any suggestions / workaround / fix would be great.


    Tore B. Krudtaa

    Join the world’s largest e-mail service with MSN Hotmail.

    This archive was generated by hypermail 2.1.5 : Wed Oct 09 2002 - 11:07:49 EDT