Am 27.04.2013 22:02, schrieb Michael Heydekamp:
Am 26.04.2013 09:58, schrieb A.L.E.C: On 04/25/2013 09:21 PM, Michael Heydekamp wrote:
Regressions just sometimes happen.
Sure. But my impression is that in 1.0 a complete new word/line wrap routine has been implemented. Is this impression correct?
The same code is available in 0.9.
Because the new wrapping routine has been backported to 0.9...?
As long as I was using 0.9-git, I didn't have all those wrapping issues I described in my recent messages. Except a specific counting problem which I still need to test with the current routine.
This needs still to be tested.
But here's another surprising real life scenario which I encountered two days ago and which leads to an incorrect word/line wrapping with the current routine (occurring with the latest 1.0-git [GIT 20130502.2041).
We compose the following text:
(start)
Xxx xxxx xxxxxxxxxx xxxxx xx xxx xxxxxxx, xxxxxxxxx. Xxxx xxxx xxx xx xxxx xxxx xxxxxxxx Xxxxx xx xxx xxxxxxx Xxxx xxx xxx Xxxxxxx "xx Xxxx":
Xxxxx xxx xxx Xxxxxxx (Xxxx), xx xxxxx xxx xxxx xx xxx xxxxxxxx xxxxxxxx.
Xx, xxxx xxxxxxx: Xxx xxxxxx Xx xxxxxx?
Xxx, xxx xxxx xxx xxx xxxxxxx Xxxxx xx xxxxxxxxx, xx xxx xxxx xx xxxxxx xxxxx... Xxx Xxxxx, xxx xxx Xxxxxxxxxx Xxxxxx Xxxxx xxx 00.00. xxxxxxxx xxx, xxx xx xx Xxxxx xxxxxxxxxxxxxxxxx Xxxxxxxxx xxx Xxxxxxxx-Xxxxxx xxxxxx xxx (xxxxxx xxxxxxx xx xxxxxx Xxxx xxx 00.00., 00:00 Xxx, Xxxxxxx "Xxxxxxxxxx xxxxxx"), xxx Xx xx xxxxxx Xxxxxxxxx xxx Xxxxxxxxxx Xxxxxx Xxxxxxx xxxxxx (Xxxx xxx 00.00., 00:00 Xxx), xx Xxx xxx xxxxxxxx Xxxx xxx xxxxxxxxxxxx xxxxx (Xxxx xxx 00.00., 00:00 Xxx), xxx:
Xxxx,
(end)
Remember, the active settings in main.inc.php are:
line_length = 76 send_format_flowed = false force_7bit = true (qp encoding)
The x-ed text above will be word/line wrapped this way:
(start)
Xxx xxxx xxxxxxxxxx xxxxx xx xxx xxxxxxx, xxxxxxxxx. Xxxx xxxx xxx xx xxxx xxxx xxxxxxxx Xxxxx xx xxx xxxxxxx Xxxx xxx xxx Xxxxxxx "xx Xxxx":
Xx, xxxx xxxxxxx: Xxx xxxxxx Xx xxxxxx?
Xxx, xxx xxxx xxx xxx xxxxxxx Xxxxx xx xxxxxxxxx, xx xxx xxxx xx xxxxxx xxxxx... Xxx Xxxxx, xxx xxx Xxxxxxxxxx Xxxxxx Xxxxx xxx 00.00. xxxxxxxx xxx, xxx xx xx Xxxxx xxxxxxxxxxxxxxxxx Xxxxxxxxx xxx Xxxxxxxx-Xxxxxx xxxxxx xxx (xxxxxx xxxxxxx xx xxxxxx Xxxx xxx 00.00., 00:00 Xxx, Xxxxxxx "Xxxxxxxxxx xxxxxx"), xxx Xx xx xxxxxx Xxxxxxxxx xxx Xxxxxxxxxx Xxxxxx Xxxxxxx xxxxxx (Xxxx xxx 00.00., 00:00 Xxx), xx Xxx xxx xxxxxxxx Xxxx xxx xxxxxxxxxxxx xxxxx (Xxxx xxx 00.00., 00:00 Xxx), xxx:
Xxxx,
(end)
The first paragraph is being wrapped correctly and according to the settings in main.inc.php. The second paragraph and the dashed lines enclosing it won't be touched anyway, the third paragraph is too short for any wrapping, BUT:
The fourth paragraph is - in contradiction to the settings in main.inc.php - not being wrapped at all. It will be sent in the same way as if "send_format_flowed = true" would be the active setting in main.inc.php. But that's not the case (although it's the case in THIS message, otherwise I wouldn't be able to demonstrate the issue).
After some investigation, I found out that the dashed lines which enclose the quoted paragraph, seem to be the cause of the issue. They are 77 chars long, but as there is no blank, they can't and won't of course be wrapped.
But if I reduce the length of these dashed lines to say 73 (i.e. less than 76) chars, then the fourth paragraph will be correctly word/line wrapped this way:
Xxx, xxx xxxx xxx xxx xxxxxxx Xxxxx xx xxxxxxxxx, xx xxx xxxx xx xxxxxx xxxxx... Xxx Xxxxx, xxx xxx Xxxxxxxxxx Xxxxxx Xxxxx xxx 00.00. xxxxxxxx xxx, xxx xx xx Xxxxx xxxxxxxxxxxxxxxxx Xxxxxxxxx xxx Xxxxxxxx-Xxxxxx xxxxxx xxx (xxxxxx xxxxxxx xx xxxxxx Xxxx xxx 00.00., 00:00 Xxx, Xxxxxxx "Xxxxxxxxxx xxxxxx"), xxx Xx xx xxxxxx Xxxxxxxxx xxx Xxxxxxxxxx Xxxxxx Xxxxxxx xxxxxx (Xxxx xxx 00.00., 00:00 Xxx), xx Xxx xxx xxxxxxxx Xxxx xxx xxxxxxxxxxxx xxxxx (Xxxx xxx 00.00., 00:00 Xxx), xxx:
So, apparently the (first?) occurence of an unwrappable line longer than the max. length defined in main.inc.php disables the word/line wrapping for the entire rest of the message content?? Or has it to do with the dashes...? Or both...?
This issue is in so far different and even contradictious to the ones that I posted before, as there LFs had been inserted where they shouldn't have been inserted (and dashed lines played a role there as well, AFAICS). In the case above it's the opposite: LFs are NOT inserted, although they should have been inserted.
Anyway, please add this to your test cases. And a fix would be highly appreciated, of course.
And believe me: I'm not desperately searchig for those kind of issues, they just happen to me in my daily Roundcube life.
Ah, and well: Can we please finally make the settings...
line_length = 76 send_format_flowed = false force_7bit = true (qp encoding)
...user-configurable?
Michael Heydekamp Co-Admin freexp.de Düsseldorf/Germany