I can display them when I write labels, but it is not recognized in my select.

$form['recette_theme']['feed_item_length'] = array(
'#type' => 'select',
'#title' => t('Thème de la recette'),
'#default_value' => variable_get('feed_item_length', $cap_francez),
'#options' => array(
't1' => t('T&#234te et pieds),
't2' => t('Joue'),
't3' => t('Foie'),
't4' => t('Coeur'),
't5' => t('Langue'),
't6' => t('Rognon'),
't7' => t('Tripes'),
),
);

I've also tried using something like this: $field_1 = sprintf("%s%c", "Tete et pieds", 234);
It's not working! But if I replace 234 with 90 for instance, I get the 'Z' character.
I am using Firefox browser, could this be a problem?

Comments

MihaiP-1’s picture

Uh, why I can't edit my post?
#default_value is working fine, the only problem is the character display.
Hope you can point me in the right direction. Thanks.

eric-alexander schaefer’s picture

Same here with german umlauts. Any ideas?

oligoelemento’s picture

It's commented in another post: http://drupal.org/node/102043

The solution is to save the code file with UTF-8 encoding (most of text editors have the option)