long subject lines
Number of replies: 20Re: long subject li
(edited by Martin to shorten subject line)
Re: long subject lines
(edited by Martin to shorten subject line)
a short subject line

Re: long subject lines
(I've edited these posts to shorten the subjects)
Re: looooooooooooooooooo ooooooooooooooooooooo ooooooooooooooooooooo ooooooooooooooooooooo ooooooooooooooooooooo ooooooooooooooooooooo ooooooooooong subject lines
Re: long subject lines
Re: long subject lines
Re: looooooooooooooooooo ooooooooooooooooooon g subject lines and Japanese
Alas, as our Prof Kariya has just reported on the Japanese forums, this fix means that a space is often inserted into the center of a two byte character causing the rest of them to garble. Japanese titles are generally all one word since there are no spaces when writing the Japanese language.
This is a very serious problem since if the title becomes garbled then the rest of the post is not displayed and noone can respond. This will happpen with quite a high (50%?) frequency for titles more than 10 Japanese characters long. By an ironic coinsidence the post by Dr. Kariya to the Japanese forum mentioning the problem with reak_up_longwords and Japnaese characters, cannot be responded to since the title is garbled and the whole thread is not displayed.
But I am afraid that I do not understand the suggestion that he makes. I will ask him. This is the my attempt at translation.
" Until a solution can be found, when using latin characters, the only way to avoid the problem seems to be by using an even number of characters. "
The following is probably irrelevant. I have no idea how one might work out where the beginnings of Japanese characters are.
On the Drupal CMS forum I saw that the blog gotoforward.org uses somethign called kakasi and "lv" or "nkf" to convert the Japanese characters into phonetic characters or even roman characters. This is probably completely irrelevant. But it seems to me that it is quite possible that someone writing in Japanese would write some single byte characters as well as double byte characters so unless one searched for the beginnings and ends of the letters by some rather sophisticated means then it would be difficult to avoid the centre of double byte letters.
http://goforward.org/?q=taxonomy/page/or/1
http://kakasi.namazu.org/index.html.en
As a complete different way of going about things, might it be possible simple to display long words wrapped?
Tim
Takemoto
Re: looooooooooooooooooo ooooooooooooooooooon g subject lines and Japanese
There is a lot of discussion going on about this on the Japanese forum
http://moodle.org/mod/forum/discuss.php?d=6831
and perhaps someone will come up with the solution (or perhaps they already have) but it seems quite difficult.
One thing that was point out was that the spaces in the title are added not every 20 characters, but after 20 and then after 21 characters. This means that even if the first space does not come in the middle of a two byte character then the second one almost definately will (unless the writer deliberately users as one byte character between the 10th and the 20th Japanese character).
Apparently in break_up_longwords there is
  $wordlength = 0;
which from the point of view of regularity should be
$wordlength = 1;
so I am told.
I think that there is already a way of fixing the problem using a modification to Japanese moodles, since Japanese two byte characters start with specific codes and end with others. However this method of judging where to add the space would be unlikely to work with other two byte character languages.
Tim
Re: looooooooooooooooooo ooooooooooooooooooon g subject lines and Japanese
So if someone comes up with the PHP code, post it here.
Re: looooooooooooooooooo ooooooooooooooooooon g subject lines and Japanese
Is there no way that words can be wrapped in the "recent activities" block thus alleviating the need for spaces to be added?
Tim
Re: looooooooooooooooooo ooooooooooooooooooon g subject lines and Japanese
The same must happen in every CMS ...
Re: looooooooooooooooooo ooooooooooooooooooon g subject lines and Japanese
-- Art
Re: looooooooooooooooooo ooooooooooooooooooon g subject lines and Japanese
I've committed a fix to Stable that will simply skip the function for multibyte languages.
Just add these lines:
if (in_array(current_language(), array('ja', 'zh_cn', 'zh_tw'))) {
return $string;
}
at the start of the function break_up_long_words() in lib/weblib.php
Re: looooooooooooooooooo ooooooooooooooooooon g subject lines and Japanese
Re: looooooooooooooooooo ooooooooooooooooooon g subject lines and Japanese
I play with computers too much. Doh!
Re: looooooooooooooooooo ooooooooooooooooooon g subject lines and Japanese
Tim, are your students writing in English or Japanese? What language is your Moodle server set to?
Re: looooooooooooooooooo ooooooooooooooooooon g subject lines and Japanese
By the way, this will be in Moodle 1.3.2 to be released later today.
Re: looooooooooooooooooo ooooooooooooooooooon g subject lines and Japanese
Thanks Martin for the very rapid fix, and Hi Paul,
Yes, I should have mentioned that Japanese wraps. I think that many of the people over at the Japanese course are just deleting the break_up_long_words() but like Paul mentions, this will mean that English long words will have the same effect as always.
I made the post above on behalf of the Japanese community in general, where it is an ongoing problem especially in the Moodle Japanese course (there are several posts that can not be read on the forums. They need to be deleted).
My server is Japanese, generally my students set the language to Japanese, but they are posting mainly in English so there have not been problems that I am aware of my moodle installation.
So... in the new version, long (English) words will not be broken up? I guess. Perhaps break up longwords should be a selectable thing in the detailed admin page? The only place where they really get in the way is in the recent activities section which I often delete as a block.
TIm
Re: looooooooooooooooooo ooooooooooooooooooon g subject lines and Japanese
I had a similar problem with the browser selecting English coding for the Japanese site. I don't know if the problem is the same.
My work around was to add the following directives in Apache under the stanza:
AddLanguage ja .ja
AddCharset EUC-JP .euc-jp
AddCharset iso-8859-1 .en
AddDefaultCharset Off
LanguagePriority en jp
I don't know if this solves the problem. However, it might be something to try.
HTH,
Bill