Forums

Weird behavior with some UTF-8 characters

flashfs 22 Nov, 2017
I have some some checkboxes with persons names, but some have special characters, like á, ç, ã. When I view them on the HTML page, everything shows fine, but when they are saved on database, they are saved with numeric codes. And I don't think it is only a DB related problem, because I can see the numeric codes when outputting the selection on a Message with {data:name}.
For example: the Ç is showed as \u00c7 on message and database, but at the HTML view it is fine.

[edit] After debugging the component code, I've reached the point where this occurs. On file /libraries/cegcore2/admin/extensions/chronofc/helpers/parser.php, the code
$result = json_encode($result)

is doing this character transformation. I don't know if this is the correct approach, but if I do
$result = json_encode($result, JSON_UNESCAPED_UNICODE)

the accented characters shows fine.
Max_admin 08 Dec, 2017
Hi flashfs,

Thanks for the post, this should be fixed in the new update!

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.

VPS & Email Hosting 20% discount
hostinger