[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-12 19:27:31 CEST

Stefan Küng 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_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.
>]]]
>Index: subversion/libsvn_subr/utf.c
>===================================================================
>--- subversion/libsvn_subr/utf.c (Revision 16653)
>+++ subversion/libsvn_subr/utf.c (Arbeitskopie)
>@@ -125,6 +125,70 @@
> }
> }
>
>+#if defined(WIN32) && defined(NOICONV)
>+/* declare the struct here, so we can use its members */
>+struct apr_xlate_t {
>+ apr_pool_t *pool;
>+ char *frompage;
>+ char *topage;
>+ char *sbcs_table;
>+};
>
>
We can't redefine apr_xlate_t. You'll have to call it something else.

[...]

>+ requiredlen = MultiByteToWideChar(fromUTF8 ? CP_UTF8 : CP, 0, inbuf, -1, 0, 0);
>
>
IIRC CP_UTF8 is only supported on Win2k (maybe even WinXP) and later. So
the conversion will fail on older versions of Windows.

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Oct 12 19:28:54 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.