Previous Thread
Next Thread
Print Thread
Hop To
#259822 03/17/2017 4:05 AM
Joined: Nov 2012
Posts: 30
M
Newbie
Newbie
M Offline
Joined: Nov 2012
Posts: 30
Chinese topic title display garbled on the forum home page.As shown in the figure.
I did not find the option to change this problem in the ADMIN.Need to modify the template file?
If you can, please tell me how to modify it.Thanks a lot!
My site link:http://forum.djsj.org
[Linked Image from forum.djsj.org]

Joined: Jan 2010
Posts: 8
E
Stranger
Stranger
E Offline
Joined: Jan 2010
Posts: 8
Control Panel -> General -> Primary (tab) -> Maximum Subject Length -> changing this value to a larger one should work

Joined: Nov 2012
Posts: 30
M
Newbie
Newbie
M Offline
Joined: Nov 2012
Posts: 30
Thanks for your reply.
It's not work.This option is about posting.
Remember at UBB.classic,there is an option about title display in the forum page,about length.

mmkk #259835 03/17/2017 10:52 AM
Joined: Nov 2012
Posts: 30
M
Newbie
Newbie
M Offline
Joined: Nov 2012
Posts: 30
upupup onoes

mmkk #259836 03/17/2017 11:12 AM
Joined: Apr 2004
Posts: 2,037
Likes: 177
UBB.threads Developer
UBB.threads Developer
Joined: Apr 2004
Posts: 2,037
Likes: 177
mmkk, this is an issue related to PHP doing a "substr" on your multi-byte Chinese characters.

For example:
Code
$subject_max_length = 26;
substr($returndata[$i]['FORUM_LAST_POST_SUBJECT'], 0, $subject_max_length);

What its basically doing is taking your string of Chinese characters, and displaying as many bytes of them as it can (Chinese characters are composed of three-bytes, IIRC). But when it finishes with the last set of three-bytes, it can only produce 2 of them before sbstr says its reached it max number of bytes. Thus, only two of the required three bytes are displayed. And you are shown an incomplete (broken) character, as a black diamond.

Originally, "mb_substr" should have been used, rather than just "substr." But...

This code has been in UBB.threads for many years. It was caught about a week ago, and converted to use the "text-overflow:ellipsis;" CSS. So that the processing should happen at the point of output, rather than the point when the data is freshly grabbed from the database.

The non-technical answer smile : Its been fixed for the upcoming UBB.threads 7.6.1 release.

Thanks for reporting this for your language. This is a huge help!


current developer of UBB.threads php forum software
current release: UBB.threads 8.0.1 // wip: UBB.threads 8.1.0
isaac @ id242.com // my forum @ CelicaHobby.com

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Having issues going from 7.5.5. to 8X
by Mors - 10/22/2026 5:32 PM
Slow Queries - Any Ideas?
by BellaOnline - 10/16/2026 8:34 PM
Selling a Forum?
by ECNet - 10/10/2026 2:54 PM
Who's Online Now
1 members (1 invisible), 870 guests, and 118 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Ride safe!
Ride safe!
by Morgan, December 7
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20261016)