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

Re: Encoding in our APIs

From: Branko Čibej <brane_at_xbc.nu>
Date: 2005-05-01 21:38:19 CEST

Peter N. Lundblad wrote:

>Hi,
>
>I'm currently working on fixing #1533, that diff outputs headers always in
>UTF8.
>
>This means adding an encoding argument (const char*) to some svn_client
>and svn_diff functions. A little inconsistency is that in
>svn_subst_translate_string, we have an encoding argument where NULL means
>the locale encoding. But in the xlate functions in APR, APR_LOCALE_CHARSET
>(which is #defined as (const char*)1) means the same.
>
>So, now I have to choose between our "style" (found in one place) and
>APR's. The nice thing with using the APR style is that we can just pass
>down the encoding argument to APR. Else, we have to special case it
>everywhere we encode from UTF8. I think it is cleaner to follow APR, even
>if it introduces a msall inconsistency in our own API. We might even fix
>this with a new svn_subst_translate_string2 if we feel pedantic.
>
>I'll follow APR if no one objects.
>
>
The interesting question here is not so much which style to follow, but
where the encoding information comes from. If you change diff to write
the headers in the "native" encoding, there's still a good chance that
it'll be a different encoding than the contents of the files are in.

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun May 1 21:40:58 2005

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