1

I tray to get data out of the database. That's no problem. But special chars like è change to è ë change to ë ..

The database has the right chars. Rsform in the backend shows the right char. This is how i get the data out of the database for use in a plugin.

    $db = JFactory::getDbo();
    $query = $db->getQuery(true);

    $query
    ->select(array('SubmissionID','FieldName','FieldValue'))
    ->from($db->quoteName('#__rsform_submission_values'))
    ->where($db->quoteName('FormId')." = 4")
    ->where($db->quoteName('SubmissionID')." > 10928");

    $db->setQuery($query);
    $rows = $db->loadObjectList();


    foreach ($rows as $row) {var_dump($row);};
  • Did you make sure your script is UTF-8 encoded (UTF-8 without BOM)? – hherger Jan 28 '16 at 11:10
  • Your page render as Windows-1252 (ISO-8859-1). You should set it to UTF-8. – Michas Jan 28 '16 at 11:16
  • @Michas how do you know that his page renders as ISO-8859-1? Would be interesting to know. – hherger Jan 28 '16 at 11:20
  • ' ' this is set.. database 'MySQL connection collation Documentation:utf8_general_ci' – user1859529 Jan 28 '16 at 12:44
  • i manual add this to the string '$html = "
    " ' now it work still don't understand why i need to add that meta again in it
    – user1859529 Jan 28 '16 at 12:53
  • @hherger The string èë saved as UTF-8 will be rendered èë if opened as Windows-1252. I think these are two most common encodings on the Internet. Using the wrong one is a very common problem. – Michas Jan 28 '16 at 12:58
  • I agree. The problem often is that the code is not **converted** (some editors can, some not) but is only **saved as**. – hherger Jan 28 '16 at 13:02

1 Answers1

0

My solution will probably not work, but let's give a try ;)

I had a similar issue with Ohana and Ark Editor... for my part it was created by my PHP configuration. By comparing two servers configurations with the same Joomla components, I discovered that « apm » was wrongfully selected in my PHP configuration.

I hope that will help you.