[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [RFC/PATCH] commit messages not 8-bit compatible

From: <cmpilato_at_collab.net>
Date: 2002-05-29 15:09:15 CEST

Ulf Tigerstedt <tiggi@infa.abo.fi> writes:

> Not a correct patch, but something that needs to be fixed one
> way or the other:
>
> Problem: едц (and other nonASCII chars)in commit messages makes the ra_dav
> server barf over the commit.

Yeah, this is a known issue.

> -
> +void
> +svn_strip_log_highbits(svn_stringbuf_t *buffer) {
> + int i;
> + for (i=buffer->len; i!=0; i--) {
> + buffer->data[i]&=0x7F;
> + }
> +}
> #define EDITOR_PREFIX_TXT "SVN:"
>
> /* This function is of type svn_client_get_commit_log_t. */
> @@ -585,6 +591,7 @@
> /* Strip the prefix from the buffer. */
> if (message)
> message = strip_prefix_from_buffer (message, EDITOR_PREFIX_TXT,
> pool);
> + svn_strip_log_highbits(message);
>
> if (message)
> {
>
> Don't apply this, but please comment.
> Should the messages be allowed to be 8bit, and is it the client or the
> server that should correct it if needed?

Ouch, just stipping the high bits from the log message? I'd hate to
try to read that one after the fact. This is not the way to go about
things.

Log messages are just revision properties, and Subversion claims
support for binary property values. So, even if, client side, log
messages were limited to 7bit (which I think should *not* happen), we
would still see this bug when someone used the upper ASCII characters
on some other property, e.g., a node's "svn:ignore" property value.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed May 29 15:11:47 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.