Problem with Polish diacritic characters after upgrading from 2.0.19

Started by RafaMa, March 03, 2025, 12:40:32 PM

Previous topic - Next topic

RafaMa

Hi :),
after upgrading Forum from 2.0.19 to 2.1.14 - I have problems with Polish diacritic characters. Any time I use ą, ł, etc. I have these: "�" in previews and message:
QuoteIncorrect string value: '\xC4
\xC4...' for column 'body' at row 1
File: /home/users/ifar/public_html/ifar/Sources/Subs-Post.php
Line: 1897   
after trying to sent a post.
I've tired changing database for UTF, check headers for PL etc.
The error appears no matter I use English or Polish translation. Right now I'm experimenting with disabling WYSIWYG editor but so far without any results...
What do you recommend?
best,
RafaMa

Doug Heffernan

Quote from: RafaMa on March 03, 2025, 12:40:32 PMHi :),
after upgrading Forum from 2.0.19 to 2.1.14 - I have problems with Polish diacritic characters. Any time I use ą, ł, etc. I have these: "�" in previews and message:
QuoteIncorrect string value: '\xC4
\xC4...' for column 'body' at row 1
File: /home/users/ifar/public_html/ifar/Sources/Subs-Post.php
Line: 1897   
after trying to sent a post.
I've tired changing database for UTF, check headers for PL etc.
The error appears no matter I use English or Polish translation. Right now I'm experimenting with disabling WYSIWYG editor but so far without any results...
What do you recommend?
best,
RafaMa

Most likely the body field of smf_messages is not utf-8. Make sure that all your database tables along with all their columns have been properly converted to utf-8.

RafaMa

Hi, many thx for your hint!!!- unfortunately all tables/columns are utf8mb4_unicode_ci... and the real problem is that after sending post  - characters are changed for something totally different.
Any more hint to share?
best,
R,

shawnb61

The supported collation for 2.1 is utf8_general_ci.  This is what the smf upgrader & other tools will convert to.  (In recent versions of mysql this is displayed as utf8mb3_general_ci; they are synonymous.)

In addition, there are 2 important settings to look at:
- $db_character_set in your Settings.php file should be 'utf8'
- The 'global_character_set' entry in your smf_settings table should be 'UTF-8'

The upgrader & smf2.0 utf8 conversion utilities will set these if they run properly to completion.
A question worth asking is born in experience & driven by necessity. - Fripp

RafaMa

WOW - it really helped!!! Surprisingly I didn't have a row with this info - so I simply added... I mean -
QuoteThe 'global_character_set' entry in your smf_settings table should be 'UTF-8'
@shawnb61  - You rock! Thank you!

best,
R.

P.S.

Advertisement: