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

Re: [PATCH]: Trying to get rid of iconv dependency on windows

From: Branko Čibej <brane_at_xbc.nu>
Date: 2005-10-15 07:03:25 CEST

Ivan Zhakov wrote:

>On 10/14/05, Stefan Küng <tortoisesvn@gmail.com> wrote:
>
>
>>[[[
>>Compile time switch to use the Windows API's instead of apr_iconv to do
>>the UTF-8 conversions.
>>
>>* subversion/libsvn_subr/utf.c
>> (win_xlate_t) : New struct to use instead of apr_xlate_t.
>> (win_xlate_conv_buffer): New function, replacing apr_xlate_conv_buffer
>> but using the Windows API instead of iconv.
>> (get_xlate_handle_node): Instead of calling apr_xlate_open fill in the
>> handle struct with Windows API information.
>> (convert_to_stringbuf): Check if the source string has zero length
>> before allocating memory.
>> (convert_to_stringbuf): Call win_xlate_conv_buffer instead of
>> apr_xlate_conv_buffer.
>>]]]
>>
>>
>I am +1 on idea remove iconv dependency on Windows, but have question
>on implementation. What for you use xlate_handle stuff? Why you didn't
>create helper and call it directly from svn_utf_stringbuf_to_utf8(),
>svn_utf_string_to_utf8(), svn_utf_cstring_to_utf8()
>svn_utf_cstring_to_utf8_ex(), svn_utf_cstring_from_utf8(),
>svn_utf_cstring_from_utf8_ex() without using xlate_handle stuff?
>
That change would be a lot more invasive...

> As I
>understand xlate handle needed to avoid often icon DLLs
>loading/unloading, but Windows already cares about this.
>
>Anyway win_xlate_t should store codepage indentifier instead of
>codepage strings. And move it's conversion to get_xlate_handle_node()
>instead of win_xlate_conv_buffer().
>
>
Anyway... before proceeding any further with this patch, I'd like to see
some definite answers about the recent report that Windows translation
functions aren't reliable for all encodings. If that's true, repllacing
apr_iconv would be taking a step backwards (and would therefore generate
a -1 from me).

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 15 07:04:07 2005

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.