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

Re: [PATCH] gettext on Win32

From: D.J. Heap <dj_at_shadyvale.net>
Date: 2004-04-18 18:32:43 CEST

Branko Čibej wrote:
> D.J. Heap wrote:
>
>> @@ -123,6 +119,31 @@
>> return EXIT_FAILURE;
>> }
>>
>> +#ifdef ENABLE_NLS
>> +#ifdef WIN32
>> + {
>> + char native_file_name[_MAX_PATH];
>> + const char* internal_path;
>> + apr_pool_t* pool;
>> + + apr_pool_create (&pool, 0);
>> + /* get exe name - our locale info will be in '../share/locale' */
>> + GetModuleFileName (0, native_file_name, sizeof(native_file_name));
>> + internal_path = svn_path_internal_style (native_file_name, pool);
>> + /* get base path name */
>> + internal_path = svn_path_dirname (internal_path, pool);
>> + /* back up one dir and append 'share/locale' */
>> + internal_path = svn_path_dirname (internal_path, pool);
>> + internal_path = svn_path_join (internal_path, "share/locale", pool);
>> + bindtextdomain (PACKAGE_NAME, internal_path); +
>> apr_pool_destroy (pool);
>>
>>
> This will never work. Our internal path handling functions assume the
> path name is in UTF-8, and gods only know what you get from the
> GetModuleFileName. Look at how we do this in config_win.c: always use
> the Unicode (UTF-16) versions of the functions, and use APR's converter
> to change them to UTF-8. Also, I think we should skip the second
> svn_path_dirname and just add "../share/locale", and make that a define.
> svn_path_join (or svn_path_canonicalize) should learn to strip out the
> ".."s anyway.

Ok, I'll do that today.

>
> The rest seems O.K.
>
> Now if only we could tell gettext to _not_ require libiconv.. Aargh!
>

Yes, it does seem ridiculous to require two different conversion libraries.

DJ

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Apr 18 18:31:12 2004

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.