FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » wordwrap.inc.t break double-byte word?
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
wordwrap.inc.t break double-byte word? [message #22815] Thu, 17 February 2005 12:22 Go to next message
huturen is currently offline  huturen   China
Messages: 4
Registered: November 2004
Karma: 0
Junior Member
in file wordwrap.inc.t,line 106:
$data .= wordwrap($v['word'], $m, ' ', 1);

will break double-byte word when the break (wrap)point is a double-byte word.

change the code to
$data .= wordwrap($v['word'], $m, ' ');
will fix it.
Is this a good way to fix?I don't know.

------ example ----
By default,GLOBALS.php set
$WORD_WRAP = 60;
and post a topic with body
1井井井井井井井井井井井井井井井井井井井井井井井井井井井井井井井
,the body will break into
1井井井井井井井井井井井井井井井井井井井井井井井井井井井井井??br />



tested in FUDforum 2.6.10.

[Updated on: Thu, 17 February 2005 12:24]

Report message to a moderator

Re: wordwrap.inc.t break double-byte word? [message #22816 is a reply to message #22815] Thu, 17 February 2005 14:31 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
It's not a good fix because one of the purposes of wordwrap is to prevent people from writing long strings without a separator to facilitate wrapping. So, unless the cut parameter (the one you removed) is set wordwrap won't be effective against those.

FUDforum Core Developer
Re: wordwrap.inc.t break double-byte word? [message #22822 is a reply to message #22816] Thu, 17 February 2005 16:18 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
My suggestion is that for multibyte installs wordwrapping be disabled. This can be done by setting the wordwrap value in the admin control panel to 0.

FUDforum Core Developer
Re: wordwrap.inc.t break double-byte word? [message #22837 is a reply to message #22815] Fri, 18 February 2005 03:09 Go to previous messageGo to next message
huturen is currently offline  huturen   China
Messages: 4
Registered: November 2004
Karma: 0
Junior Member
Thanks.Would you change the note of Word Wrap in Global Configuration?It will be helpful for multibyte user who is new for fudforum.

like this:
Quote:

Word Wrap:
This setting defines on how many character to wrap message bodies on, any text string longer the the number of character in this option will be broken down into 1 or more strings using a space as a separator.For multibyte installs you would like to set the value to zero.

[Updated on: Fri, 18 February 2005 03:10]

Report message to a moderator

Re: wordwrap.inc.t break double-byte word? [message #22838 is a reply to message #22837] Fri, 18 February 2005 03:11 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
That is a good idea, I'll add a note about multibyte for wordwrap option.

FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: PATH_INFO setting break user?
Next Topic: firefox cookies problem [?]
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 30 02:23:33 GMT 2024

Total time taken to generate the page: 0.02830 seconds