News:

Wondering if this will always be free?  See why free is better.

Main Menu

Codification problems when previewing a message

Started by FragaCampos, June 30, 2020, 11:33:51 PM

Previous topic - Next topic

FragaCampos

Hi there.

When previewing a message, special characters appears like this:



But when posting, everything is ok. I believe this happened after the recent PHP update in my server.
What can I do to correct this?

Deaks

sorry for small delay, but are you using UTF-8?
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

FragaCampos

Thanks for replying, Deaks.

Yes, I am. I never experienced this in years using SMF and when posting everything is ok. This only happens when previewing.

Deaks

Youmentioned you think its the php version, what version are you running?

Also go to your admin panel and convert all to utf-8 again this is long shot but may fix it :D
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

FragaCampos

My server's PHP version is 7.3.6.

I did as you suggested, but the problem persists.  :-\

I've noticed that 1/3 of my database has utf8_general_ci collation and 2/3 has latin1_swedish_ci collation. I think this has nothing to do with it, because nothing changed there in the last months, but could something have changed in the last SMF update because of this?

Arantor

Other than the small detail of you having UTF-8-presented-as-Latin1, you mean. Not relevant except for the fact it looks suspiciously relevant.

How did you arrive at '1/3 of my database', by looking at the table default which is a default and overridden entirely by SMF given any chance whatsoever?

What's the value of $db_character_set in Settings.php? What language are you using on the site yourself to make that preview?
Holder of controversial views, all of which my own.


FragaCampos

I arrived at 1/3 just by looking at database column collation, but I really can't tell what's relevant from what's not, Arantor.
I'm running the forum as it is for years and this problem just appeared in the last few weeks, after updating to 2.0.17, which coincided with the PHP version update.

The value of  $db_character_set is utf8.

I'm using Portuguese_pt-utf8 language to make the preview. My forum has portuguese_pt-utf8 and english "installed".




Quote from: Arantor on July 06, 2020, 05:14:17 PM
Other than the small detail of you having UTF-8-presented-as-Latin1, you mean. Not relevant except for the fact it looks suspiciously relevant.

How did you arrive at '1/3 of my database', by looking at the table default which is a default and overridden entirely by SMF given any chance whatsoever?

What's the value of $db_character_set in Settings.php? What language are you using on the site yourself to make that preview?

FragaCampos


Doug Heffernan

Is this happening in the previous posts only, or in the new posts too?

FragaCampos


FragaCampos

By the way, this doesn't happen when previewing private messages.

live627


FragaCampos

Hmmm, now that I remember, I did those edits on script.js, like shawnb61 suggests. It did solve the issue mentioned in that topic, but could it be that it produced this one I brought up here?

FragaCampos

Thanks to live627, I rechecked the changes in the topic mentioned and realized I only had done the first change.
Now that I also did the second change, everything went back to normal.

Sorry about that and thank you all for your help.

Advertisement: