[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: Ben Collins-Sussman <sussman_at_red-bean.com>
Date: Sun, 6 Jul 2008 07:34:01 -0500

On Sun, Jul 6, 2008 at 5:23 AM, Barry Scott <barry_at_barrys-emacs.org> wrote:
>
> On Jul 3, 2008, at 23:12, Ben Collins-Sussman wrote:
>
>> The repository stores all log messages as UTF8, and they travel that
>> way to the clients. The clients are responsible for converting UTF8
>> to the native locale. Thus, if a user has latin-1 set as a native
>> locale, that's what 'svn log' will show him. For more info, see:
>>
>> http://svnbook.red-bean.com/nightly/en/svn.advanced.l10n.html
>>
>
> 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.

---------------------------------------------------------------------
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-06 14:34:25 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.