Development

#4165 (Special characters are not displayed in the widget with the default options)

You must first sign up to be able to contribute.

Ticket #4165 (new enhancement)

Opened 5 years ago

Last modified 5 years ago

Special characters are not displayed in the widget with the default options

Reported by: botero82 Assigned to: fabien
Priority: minor Milestone:
Component: widget Version: 1.1.0
Keywords: Cc:
Qualification: Design decision

Description

Characters like á, é, í, ... etc. are not displayed in the widget with the default options, for example

'name' => new sfWidgetFormSelect( array('choices' => array("árbol"=>"árbol")) )

display

<option value=""></option>

In file sfWidget is $charset = 'UTF-8' by default, but you can´t configure it in any file.

I think that if you set the encoding in settings.yml the widget should take that or maybe from another file.

in settings.yml all:

.settings:

charset: iso8859-1

Attachments

sfWidget.class.patch (112 bytes) - added by m-matze on 09/12/08 10:19:51.
Patch for encoding problem in widget

Change History

09/12/08 10:19:51 changed by m-matze

  • attachment sfWidget.class.patch added.

Patch for encoding problem in widget

(in reply to: ↑ description ) 09/12/08 11:04:21 changed by m-matze

  • component changed from other to widget.
  • qualification changed from Unreviewed to Design decision.

As You can see in changeset:1752 (http://trac.symfony-project.org/changeset/1752) we can use sfConfig::get('sf_charset') in construct of sfWidget class.

The same problem is in class sfValidatorBase. 'UTF-8' is fix in class var $charset. Have a look to the attachment patch file.