Welcome Guest, Not a member yet? Register   Sign In
Form helper displays unicode characters as &#xxx;
#1

[eluser]earthdog[/eluser]
Hi All!

My problem is shown on the first screenshot.

A view containing the same form in 2 ways: using form helper and using standard html tags.

The issue is that i dont get the unicode (greek) characters shown up.Instead i am getting them in the format &#xxx;..

My CI config files are configured for utf8
HTML response headers indicate uf8
My Db/tables/fields are all utf8

What am i missing guys?

Thanks.
#2

[eluser]TheFuzzy0ne[/eluser]
Are HTML Entities being escaped twice? Do you have the right page encoding set?
#3

[eluser]earthdog[/eluser]
I was not escaping anything..

I checked that UTF-8 was in *ALL* places (db,tables,fields,headers) and then i exported and imported the data again....

thanks
#4

[eluser]TheFuzzy0ne[/eluser]
The form helper should only escape HTML values when you use set_value, and it definitely only escapes them once.

What does the page source look like? &#xxx; or &#xxx;?

What browser are you using?

Are you outputting a header that sets encoding? If so, where, and what does it look like? If not, try putting this at the top of your view (before the doctype):
Code:
<?php header('Content-type: text/html; charset=utf-8'); ?>




Theme © iAndrew 2016 - Forum software by © MyBB