[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: Ivan Zhakov <chemodax_at_gmail.com>
Date: 2005-10-14 22:56:18 CEST

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

Ivan Zhakov
Received on Fri Oct 14 22:57: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.