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

Re: Remove APR_ICONV dependency on Windows

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: 2007-05-16 22:46:35 CEST

Mark Phippard wrote:

>> Note: it does not work if conversions are needed from/to another locale
>> than the local one. But since UI clients usually only convert to the
>> current locale from/to utf8, that's not really an issue.
> I do not believe Subversion does any other kind of conversion either.

Yes it does. You can for some APIs pass a param to force the output to
be in another locale. I don't think the CL client uses those, but the
APIs can do this.
I haven't implemented this for two reasons:
* I don't know how to convert a locale given as a string (e.g.,
"iso-8859-1") into the value needed to pass to the Windows APIs.
* TSVN doesn't use those anyway

> Stefan, what happened last time? Did you just get tired of the back
> and forth and decide it was easy enough to handle in your build
> system? It seemed like you addressed all the comments though, why did
> this not get applied?

Well, to be honest, I simply don't have the energy to deal with that
anymore. So I just kept the patch for TSVN. And with this patch I was
(and still am) absolutely sure that it will get rejected:
* it doesn't work for conversions to/from a charset which is not set as
the current one in the process/thread
* it uses new/delete instead of apr pools to reserve the memory

And I haven't really checked, but there also might be some tabs in there
instead of spaces :)

Yes, I could have done this 'properly' by using apr pools and maybe come
up with some workaround for the non-current locale conversions. But that
would have meant more work for me, with the very high risk that after I
addressed all the concerns of the devs it would still get rejected.

> I am not a C programmer, but looking at the code, it looked like you
> conditioned it based on something you are DEFINE in your own buld
> system. Could we just make it always do this when building on WIN32?

Yes, I don't define APR_HAS_XLATE. If that isn't defined but WIN32 is,
then the windows APIs are used to convert from/to utf8.


   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed May 16 22:46:56 2007

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