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().

Reply via email to