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

Re: Are log messages Unicode?

From: Karl Fogel <kfogel_at_red-bean.com>
Date: Mon, 07 Jul 2008 12:15:16 -0400

"Ben Collins-Sussman" <sussman_at_red-bean.com> writes:
> On Sun, Jul 6, 2008 at 5:23 AM, Barry Scott <barry_at_barrys-emacs.org> wrote:
>> Using the svn_client API is it possible for a client to write
>> none-UTF-8 log messages?
>> Clearly if this happened it would be a bug in the client given the
>> above statement.
>
> I don't recall the details, but it's actually the *programmers'*
> burden to convert paths and log messages from native locale to UTF8
> (and back again). If you read the svn APIs, you'll notice that every
> path and log message passed into APIs (or passed around between APIs)
> are presumed to *already* be UTF8. So if you're writing your own
> client, it's your job to convert user input to UTF8 before passing to
> svn_client_*(). Look at the commandline client to see how it's doing
> that; I believe there a number of convenience routines in libsvn_subr
> to help with conversion.

I think Barry's asking if the client and/or server do any validation.
That is, if the programmer supplies a non-UTF8 log message, our client
libraries should reject it; and if such a log message were to reach the
repository (perhaps because someone wrote their own client software from
scratch), the repository should reject it too.

I don't know whether we do such validation or not, but agree we should.

Barry, got time to test/trace it?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-07-07 18:15:37 CEST

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.