Yii Framework Forum: Specific characters in TinyMCE cause PDO exception - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Specific characters in TinyMCE cause PDO exception Redactor and CKEditor failing too Rate Topic: -----

#1 User is offline   jaimez 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 13-July 17

Posted 14 November 2017 - 08:24 AM

Hi all,
I have ActiveForm with yii2-tinymce-widget. It works but I'm facing an issue with some specific characters. So far, I have found that characters like č (c with caron) or ľ (l with caron) are causing PDOException:

SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xC4\x8D</p>' for column 'obsah' at row 1


However, some other characters with diacritic works okay.I have already tried to replace TinyMCE with Redactor and CKEditor but it failed with the same error.

Other fields (even field with my custom widget) accept these language-specific characters and write them to database without any trouble.

Please, do you have any ideas how to fix this ?
0

#2 User is offline   alrazi 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,368
  • Joined: 08-August 12
  • Location:Durban, South Africa

Posted 14 November 2017 - 09:07 AM

check your database encoding make sure you have utf-8 set for all the tables as well as the fields.
0

#3 User is offline   jaimez 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 13-July 17

Posted 15 November 2017 - 02:43 AM

Database encoding is already utf8 but i have found that character set for column was latin1, although all columns in this table are set to utf8. Thank you Alrazi, your advice helped me find this mistake.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users