Jump to the post that solved this thread.
Solved: 1 Month, 6 Days ago Corrupt / Unknown character (�) in Last Post's Name
#1
Solved: 1 Month, 6 Days ago
Hello!

I am a relatively new administrator of a local forums project, and I was tasked with upgrading from MyBB 1.8.7 to the newest 1.8.24.

So far, the process was relatively smooth. I now have the forums upgraded and am looking for the little things, that broke / changed between versions. And so far, I have only found one issue, that absolutely eludes me - 

I have modified the forumbit_depth2_lastpost template to show the name of the last thread through the {$lastpost_subject}) variable. It works ~95% of times, but there are cases, where the last thread's name is displayed with the last character replaced with a � sign (Note.: It was a multibyte character - one of the special accented characters my language uses).

First thing that came to mind was an issue with text encoding, but as stated before, 95% of the remaining text on the forums is absolutely okay. The character that broke can even be found elsewhere, on the same page. So, as far as I am aware, this is not an encoding issue.

Next, I checked the database data, if maybe that got corrupted... But no, it also contains the correct thread name, incl. accents. 

Then... I paused and noticed - these corrupt characters only appear in thread names that are too long, and so mybb omits a part of them, and the special character that broke was always the last symbol before the ellipsis (...)

Is it possible that, internally, MyBB treats strings as a sequence of non-decoded bytes and, if the data is too long, simply truncates it to a predefined length, thus, if a multibyte character is present at the end, it can cut away a part of it, corrupting it in the process?

Any help would be much appreciated, thank you!
Reply
Jump to the post that solved this thread.


Messages In This Thread
Corrupt / Unknown character (�) in Last Post's Name - by aldar - 2020-10-25, 10:08 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)