Saturday, 14 September 2013

Special character encoding french cakephp

Special character encoding french cakephp

I have this code to put my string french
<?php echo $this->Form->create('Envoie');?>
<fieldset>
<legend>
<?php echo __('Imaa Envoie'); ?>
</legend>
<textarea name="data[code]" cols="30" rows="12" ></textarea>
</fieldset>
<?php echo $this->Form->end(__('Submit'));?>
In my controller i have this code
$strng=explode("ss", $this->request->data["code"]);
$sss="";
for($i=0;$i<count($strng)-1;$i++)
{
$s=$strng[$i];
$info=explode('&&&id', $s);
$id=trim($info[0]);
$sss=$sss."<br>sum code<br>";
$script=str_replace ( "aa", '"'.$login.'"', $script);
$sss=$sss.$script;
}
$this->set("sss",$sss);
In my view i have this
<?=$sss ?>
String in is : 157m² de superficie, 2ème étage, 2 Salons, 2 ch., 2 SDB,
Séjour, Cuisine, Buanderie, …
String out is : 157m² de superficie, 2ème étage, 2 Salons, 2 ch., 2
SDB, Séjour, Cuisine, Buanderie,â&#65533;¦

No comments:

Post a Comment