Welcome Guest, Not a member yet? Register   Sign In
scaffolding, UTF-8 and HTML entities, what's happening?
#1

[eluser]Barber of Padua[/eluser]
I'm using the CI 1.7.1 scaffolding feature to quickly adapt some texts of a soon to be launched site. Whenever I type something like
Code:
ë
in a scaffolding form, it gets stored in the DB as the regular character (ë), not the HTML-entity I typed.

All texts are stored in a DB-table with a utf8_unicode_ci collation.

All templates have a UTF-8 charset. Though it seemingly looks ok when viewing the page in a browser, shouldn't these special characters always be HTML-entities? And if so, how can I persuade CI not to change it? ;-)

I'm a bit lost here, would any unicode/CI wizard please shed some light here?
#2

[eluser]Clooner[/eluser]
[quote author="Barber of Padua" date="1274397002"]I'm using the CI 1.7.1 scaffolding feature to quickly adapt some texts of a soon to be launched site. Whenever I type something like
Code:
ë
in a scaffolding form, it gets stored in the DB as the regular character (ë), not the HTML-entity I typed.

All texts are stored in a DB-table with a utf8_unicode_ci collation.

All templates have a UTF-8 charset. Though it seemingly looks ok when viewing the page in a browser, shouldn't these special characters always be HTML-entities? And if so, how can I persuade CI not to change it? ;-)

I'm a bit lost here, would any unicode/CI wizard please shed some light here?[/quote]

I'm not sure about scaffolding since I never used the CI scaffolding but it sounds like a call is being made to html_entity_decode at some point. Check the scaffolding files for that.
#3

[eluser]Barber of Padua[/eluser]
I checked the Scaffolding.php core class, but it's just using standard CI->db calls. So I can't find anything suspicious there.




Theme © iAndrew 2016 - Forum software by © MyBB