[BUG] Strip trailing whitespace from commit message

John Arbash Meinel john at arbash-meinel.com
Thu Dec 21 17:17:56 GMT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alexander Belchenko wrote:
> It's not a bug.
> It's intended behaviour.
> 
> As someone pointed me in the past
> there is languages with right-to-left writing.
> 
> Bzr do the best.
> Bzr cannot to guess what the best for user,
> so it's just don't break anything.
> 
> Alexander

Well, right-to-left languages actually still have the characters in the
same sequence. For example جاون Is typed such that you have:
ج
ا
و
ن

In that order. So if there was "trailing" whitespace, it would still
happen *after* the byte sequences for the other characters. It would
just show up on the left hand side rather than the right hand side.

So we could still strip "trailing" whitespace, since in the bytestream
it happens after the fact.

I don't know of any languages where whitespace after valid characters is
significant. But I will readily admit to not knowing that many
languages. And it could certainly be that it some language "foo " is
distinctly different from "foo". Though I would guess a language like
that would have a " " character which was not removed by .strip(), since
they wouldn't re-use code 0x20 to indicate that type of space. (Think
  in html terms).

But I do second your feeling that if we guess we will sometimes get it
wrong, and without a good way to make it right, we should avoid guessing.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFisHEJdeBCYSNAAMRAgdkAJ9dJ8xcM9gERPe3BsQ9nskjY8W4cwCgxwPi
40NMyeZ13Y5DT/dPe66VCnM=
=zNH7
-----END PGP SIGNATURE-----




More information about the bazaar mailing list