apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karl Fogel <kfo...@newton.ch.collab.net>
Subject Re: Is --enable-utf8 working everywhere?
Date Wed, 17 Jul 2002 03:25:21 GMT
Branko ─îibej <brane@xbc.nu> writes:
> Karl, about the file name conversions in Subversion: remember what I
> said about APR using UTF-8 file names directly on some platforms?
> Well, the conversions in SVN should probably be coded like this:

Yeah, remember that.  But does the platform-specific conditional code
have to go in Subversion?  I understand that APR rightly shouldn't do
any conversion here, since the output would be the same as the input,
but perhaps APR could somehow signal this fact back?  (The fact that
no conversion is necessary, that is).  After all, it is our
portability layer... Then Subversion, on receiving this signal, could
simply dup the input in the right pool and return it, without having
any platform-specific tests in its own code.

(Btw we *do* have to dup into the right pool, can't just assign back,
as Marcus and I learned the hard way :-) ).

>     char *utf8_filename = (something);
>     char *native_filename;
>   #ifdef WIN32
>   # if APR_HAS_UNICODE_FS
>     IF_WIN_OS_IS_UNICODE
>     {
>       native_filename = utf8_filename;
>     }
>   # endif
>   # if APR_HAS_ANSI_FS
>     ELSE_WIN_OS_IS_ANSI
>     {
>       native_filename = convert_utf8_to_locale_charset(utf8_filename);
>     }
>   # endif
>   #else  /* !WIN32 */
>     native_filename = convert_utf8_to_locale_charset(utf8_filename);
>   #endif /* !WIN32 */

-K

Mime
View raw message