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

Re: svn commit: r14961 - branches/server-l10n/subversion/libsvn_ra_dav

From: Daniel L. Rall <dlr_at_finemaltcoding.com>
Date: 2005-06-03 19:29:57 CEST

On Fri, 2005-06-03 at 12:02 -0500, dlr@tigris.org wrote:
...
> Log:
> * subversion/libsvn_ra_dav/util.c
> (parsed_request): Always send the Accept-Language header as part of
> the request to communicate our language preference to the server.
> mod_dav_svn doesn't yet do anything with this information (though
> is likely to eventually), but other modules may.
...
> --- branches/server-l10n/subversion/libsvn_ra_dav/util.c (original)
> +++ branches/server-l10n/subversion/libsvn_ra_dav/util.c Fri Jun 3 12:02:12 2005
...
> @@ -664,6 +666,14 @@
> ne_add_response_body_reader(req, ne_accept_2xx,
> ne_xml_parse_v, success_parser);
> }
> +
> + /* Add the Accept-Language header to announce our language
> + preferences, as per section 14.4 of RFC 2616
> + <http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html>. */
> + /* ### l10n-problems says that Windows doesn't define LC_MESSAGES,
> + ### but Visual Studio 2005 appears to:
> + ### <http://msdn2.microsoft.com/library/x99tb11d(en-us,vs.80).aspx> */
> + ne_add_request_header(req, "Accept-Language", setlocale(LC_MESSAGES, NULL));
>
> /* Register the "error" accepter and body-reader with the request --
> the one to use when HTTP status is *not* 2XX */

A couple of questions on this one. I'm seeing a HTTP header of:

  Accept-Language: en_US.UTF-8

The ".UTF-8" portion concerns me, as I've never seen that locale format
passed over the wire. I assume that I should strip it?

Can I use setlocale(LC_MESSAGES, NULL) on Windows to retrieve the
current locale (as I can on POSIX)? If not, what's the alternative?

- Dan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jun 3 19:32:46 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.