Hi everybody,
I'm having a problem with the UTF8 characters saved in database. They are in UTF8 in sended mail. That is what the debugger shows :
I'm having a problem with the UTF8 characters saved in database. They are in UTF8 in sended mail. That is what the debugger shows :
Array
(
[option] => com_chronoforms6
[chronoform] => ...
[event] => submit
[1] => Array
(
[0] => Est agréable à vivre
)
[save_data12] => Array
(
[data] => Array
(
[created] => 2019-03-18 12:31:07
[user_id] => 0
[ip_address] => ...
[1] => ["Est agr\u00e9able \u00e0 vivre"]
[email8] => Array
(
[recipients] => Array
(
[0] => xxx@xxx.com
)
[subject] => ...
[body] =>
<table width="100%" cellpadding="5" cellspacing="3" border="0" class="ui table"><tr><td width="30%" valign="top" align="right"><strong>1 - ....</strong></td><td width="70%" valign="top" align="left">Est agréable à vivre</td></tr><tr><td width="30%" valign="top" align="right">Thanks for help !
How is the data displayed in the table manager in the admin area ?
Best regards,
Max
Best regards,
Max
https://stackoverflow.com/questions/202205/how-to-make-mysql-handle-utf-8-properly
In admin area, data are displayed like this :
Est agr\u00e9able \u00e0 vivreThank you for your help Max
Thanks healyhatman.
I've changed my data incoding in phpmyadmin from utf8_general_ci to utf8mb4_general_ci and tried utf8mb4_unicode_ci also, but it does not change anything.
I've changed my data incoding in phpmyadmin from utf8_general_ci to utf8mb4_general_ci and tried utf8mb4_unicode_ci also, but it does not change anything.
What happens if you use
Also does https://www.toptal.com/php/a-utf-8-primer-for-php-and-mysql help
echo utf_encode($this->data("name_of_your_form_field"));In a PHP block? Or utf_decode?
Also does https://www.toptal.com/php/a-utf-8-primer-for-php-and-mysql help
The variable itself seems fine :
Echo : Est agréable à vivre
Encode : Est agréable à vivre
Decode : Est agr�able � vivre
I don't have control over the database parameters, but the fields are UTF-8. The rest of joomla works with the same database link, so I guess the parameters are fine.
Please note that in my Debugger output, the first block is fine while the second isn't. Is that a database read, or the data as it is to be sent to the DB ?
Echo : Est agréable à vivre
Encode : Est agréable à vivre
Decode : Est agr�able � vivre
I don't have control over the database parameters, but the fields are UTF-8. The rest of joomla works with the same database link, so I guess the parameters are fine.
Please note that in my Debugger output, the first block is fine while the second isn't. Is that a database read, or the data as it is to be sent to the DB ?
I think this is a bug with the latest one or two updates but a fix should be available in the next update!
Best regards
Best regards
Thanks Max for the update. It's ok now for UTF8.
I still have a problem : a SQL 1064 error message. Could it be possible that ( or / in text field produce this error ?
I still have a problem : a SQL 1064 error message. Could it be possible that ( or / in text field produce this error ?
Hi LePache,
I think a 1064 message is a syntax error - if you add a Debugger to your form temporarily you should see the SQL query that is being created. That will help you pin down where the error is occurring.
Bob
I think a 1064 message is a syntax error - if you add a Debugger to your form temporarily you should see the SQL query that is being created. That will help you pin down where the error is occurring.
Bob
Unfortunately v6 data actions aren't caught and cause a fatal error so you won't see any debug or anything. Which I've requested Max change.
Hi healyhatman,
Hmmm . . . does the Joomla! debugger show the query? That might help.
Bob
Hmmm . . . does the Joomla! debugger show the query? That might help.
Bob
Hi everybody,
I still have this red message of SQL error. And of course,I can't see the debugger when it occurs.
the form does not pass the first time and then passes with the same data once next.
The error is always of the same type. A field (checkbox or radio) then a number between ' ' (which is not a data entered in the form) then the contents of other fields (the last is cut).
I do not understand at all what can generate this error.I removed all the special characters from the options of chechboxes or radios ...
Please help ! My client becomes crazy...
I still have this red message of SQL error. And of course,I can't see the debugger when it occurs.
the form does not pass the first time and then passes with the same data once next.
The error is always of the same type. A field (checkbox or radio) then a number between ' ' (which is not a data entered in the form) then the contents of other fields (the last is cut).
I do not understand at all what can generate this error.I removed all the special characters from the options of chechboxes or radios ...
Please help ! My client becomes crazy...
I finally found the cause of the SQL error.
WARNING: the name of the fields must not start with a number, which is not specified in CF6!
And since the name of the field is automatically generated with the label, if it starts with a number (eg the number of the question), this causes SQL errors!
It would be nice to test (as in CF5) that the name does not start with a number ...
WARNING: the name of the fields must not start with a number, which is not specified in CF6!
And since the name of the field is automatically generated with the label, if it starts with a number (eg the number of the question), this causes SQL errors!
It would be nice to test (as in CF5) that the name does not start with a number ...
This topic is locked and no more replies can be posted.
