Previous Thread
Next Thread
Print Thread
Hop To
#259822 03/17/2017 12: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.

Joined: Nov 2012
Posts: 30
M
Newbie
Newbie
M Offline
Joined: Nov 2012
Posts: 30
upupup onoes

Joined: Apr 2004
Posts: 1,945
Likes: 145
UBB.threads Developer
UBB.threads Developer
Joined: Apr 2004
Posts: 1,945
Likes: 145
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: UBBT 7.7.5 // Preview: UBBT 8.0.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
spam issues
by ECNet - 03/19/2024 11:45 PM
Looking for a forum
by azr - 03/15/2024 11:26 PM
Editing Links in Post
by Outdoorking - 03/15/2024 9:31 AM
Question on barkrowler and the like
by Mors - 02/29/2024 6:51 PM
Member Permissions Help
by domspeak - 02/27/2024 6:31 PM
Who's Online Now
1 members (Havenofsobriety), 458 guests, and 91 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)