Welcome Guest, Not a member yet? Register   Sign In
[validation] problem with validation library and htmlentites (strange conversion)
#1

[eluser]ariok[/eluser]
Hi !
I have a problem with this code

Code:
$arr_data = array (
   "first"=>htmlentities ($this->validation->first),
   "last"=>$this->validation->last,
   "email"=>$this->validation->email,
   "username"=>$this->validation->username,
   "password"=>$this->validation->password,
   "sede"=>$this->validation->sede
);

$this->db->insert("pnl_users",$arr_data);

In "first" field i try to use an htmlentites conversion, but when i insert the char 'à'
i obtain this conversion "Atilde sup2"(Ã&sup2Wink instead of "agrave"(&agraveWink

Could you help me??

(i also tried to apply html entities directly in rules with $rules["first"]="htmlentities" but nothing changes)
#2

[eluser]ariok[/eluser]
i wrote this code in a class....to see what this expression produce..
Code:
echo (htmlentities("à"));

and i got the same problem... Atilde..instead agrave.... why???
#3

[eluser]ariok[/eluser]
ok.. i found where's the problem....the problem is DREAMWEAVER!Tongue
In my dreamerver settings i set "utf-8" as charset but it seems to use another strange charset notwithstanding my settings.
In fact if i open file where i wrote "echo (htmlentites("à"))" with another (opensource and freeware) software i read
"echo htmlentites("Ã");" ... really strange




Theme © iAndrew 2016 - Forum software by © MyBB