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

Re: [PATCH] allow svnsync to translate non-UTF-8 log messages to UTF-8 (v. 3)

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Mon, 10 Jan 2011 22:08:35 +0200

Danny Trebbien wrote on Mon, Jan 10, 2011 at 08:55:35 -0800:
> >> Perhaps, though, I should use svn_subst_translate_string2() with the
> >> encoding set to "UTF-8". It would greatly simplify normalize_string(),
> >
> > +1.  Just call it with encoding=NULL; using the same API in both
> > branches makes life easier for the next person to revv that API.
>
> One thing that worries me about using NULL for ENCODING is that
> svn_subst_translate_string2() calls svn_utf_cstring_to_utf8() on the
> string in that case, implying some sort of re-encoding from the native
> narrow string encoding to UTF-8. Couldn't this be problematic?

svn_subst_translate_string2()'s doc string explicitly blesses passing
encoding=NULL, so it's not of our concern in svnsync.

I agree, however, that it might be a bug in svn_subst_translate_string2().)
Feel free to check how svn_subst_translate_string() handled
encoding=NULL and, if needed, submit a patch to
svn_subst_translate_string2().
Received on 2011-01-10 21:12:22 CET

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.