manikandan170890 / php-form-builder-class

Automatically exported from code.google.com/p/php-form-builder-class
GNU General Public License v3.0
0 stars 1 forks source link

Support of utf-8 in values #165

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hello,

I'm writing forms in French on Linux and the default encoding UTF-8
is not displayed properly as textbox value.

== What steps will reproduce the problem?

1.Have source code in utf-8 encoding

2.Declare utf-8 content-type
  header('Content-Type: text/html; charset=utf-8'); 

3.Define a textbox like:
  $form->addElement(new PFBC\Element\Textbox("Boîte accentuée:",
                          "Textbox", array("value" =>"Voilà")));

== What is the expected output? What do you see instead?

The textbox value is displayed as latin1 encoding.
Couldn't it follow current environment ?

== Workaround: using utf8_decode()
  $form->addElement(new PFBC\Element\Textbox("Boîte accentuée:",
                          "Textbox", array("value" 
                                           => utf8_decode("Voilà"))));

== What version of the product are you using? On what operating system?

I'm using pfbc2.2-php5.3 with PHP Version 5.3.3-1ubuntu9.10, Apache/2.2.16 on 
linux (ubuntu 10.10).

I tested the form on Chromium and Firefox.

Thank you.

Original issue reported on code.google.com by rocky.bz...@gmail.com on 22 Apr 2012 at 11:02

Attachments: