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

[PATCH] Remove APR ICONV dependency on Windows (was SVN Win32 Developers -- need some help)

From: Ivan Zhakov <chemodax_at_gmail.com>
Date: 2007-06-30 23:45:41 CEST

On 6/30/07, Mark Phippard <markphip@gmail.com> wrote:
> On 6/30/07, D.J. Heap <djheap@gmail.com> wrote:
> > On 6/5/07, eg <egoots@gmail.com> wrote:
> > > Mark Phippard wrote:
> > >
> > > >
> > > > Even in his objection Brane said "if this is true". All I (and
> > > > Stefan) am saying is we need a more specific objection. If there are
> > > > real problems that we cannot resolve, then I am sure we would all be
> > > > against this. But we know there are problems with apr_iconv too, so
> > > > let's just understand what the problems are.
> > > >
> > >
> > > In an attempt to help here, I have done a bit of hunting around to see
> > > if I could substantiate any publicly reported issues. I have mentioned
> > > the few that I have found in other posts. Stefan has already responded
> > > that these should not be issues for Subversion.
> > >
> > > The only other thing I could find for utf8 conversion, relates to
> > > handling of "bad inputs" related to lone surrogate halves when passing
> > > them to WideCharToMultiByte() on older versions of Windows (alluded to
> > > in blog comments from:
> > > http://blogs.msdn.com/michkap/archive/2006/01/20/515238.aspx).
> > > Apparently this is tightened up now (on Vista?).
> > >
> > > I suspect this is also not an issue for this usage in any case, but
> > > someone else more familiar with svn usage should confirm that.
> > >
> > > If there are any issues related to using Win32
> > > MultiByteToWideChar()/WideCharToMultiByte() in place of iconv() under
> > > Windows, I cannot find them. Older versions of Windows (95/98/Me) will
> > > need to install and use the MSLU (Microsoft Layer for unicode).
> >
> >
> > So, I have not been following along very carefully, but what needs to
> > happen now? Do a build and have people using different languages test
> > it?
> >
> > I can apply the patch and build the binary zips if other people have
> > the means to test them out a bit.
> >
> > Or is there something else that needs to be done?
>
> Does the test suite have any tests that exercise this?
>
> Ivan had said he was going to look into it, but I do not think he has.
> Ideally, I think someone should put together the patch that they
> think works completely and just commit it. Then we can bang on it and
> see if there are issues.
>
Sorry, I was busy and I have not time to report my research results.

My patch almost complete and I need somebody's eyes to look and
confirm that I'm on right way (or say that I'm on wrong way :)

I used Windows MIME database to convert page name to Windows page identifier.
And most important question is it acceptable to read Windows MIME
database directly from registry instead of using MLang API [1]? I
didn't use MLang API, because it requires
CoInitialize()/CoUninitialize().

Other notes:
- Probably this new win32_xlate stuff should go to separate file?
- For present time charset aliases isn't implemented.

[1] http://msdn2.microsoft.com/En-US/library/aa767865.aspx

[[[
!! This patch is NOT complete. !!!

Remove APR ICONV dependency on Windows and use native Windows
character conversion API (MultiByteToWideChar/WideCharToMultiByte).

* subversion/tests/libsvn_subr/utf-test.c
  (test_utf_cstring_to_utf8_ex2): New test for conversion from
different codepages to utf8.
  (test_utf_cstring_from_utf8_ex2): New test for conversion to
different codepages from utf8.
  (test_funcs): Add two tests.

* subversion/libsvn_subr/utf8.c
  (win32_xlate_t): New structure for holding Windows xlate data.
  (discover_windows_codepage_id): New helper for converting page name to Windows
  page identifier.
  (win32_xlate_open): New function to open Windows xlate.
  (win32_convert_to_string_buf): Converts string from one codepage to
another using
  Windows API.
  (get_xlate_handle_node): Use win32_xlate_open() on Windows.
  (convert_to_stringbuf): Use win32_convert_to_stringbuf() on Windows.
]]]

-- 
Ivan Zhakov


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Sat Jun 30 23:45:43 2007

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.