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

utf-8 sanity check.

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2002-07-10 23:31:11 CEST

I'm getting ready to write some python tests that verify that we can
deal with paths that have international characters in them.

But before I do that, I want to make sure I understand what's going
on in our code:

  * our application's main() calls setlocale(LC_ALL, locale) if
    --locale is passed by the user. This officially sets the locale for
    our process.

  * our utf.c routines set up a xlation table by calling
    apr_xlate_open() with two arguments: "UTF-8" and APR_LOCALE_CHARSET.

  * The latter argument causes apr_xlate_open to call nl_langinfo(CODESET).

  * nl_langinfo(), part of libc, then returns the charset defined by
    the program's locale. (according to my man page, at least.)

So by this trace, it seems to me that we're all ready to go, then.
There's no need to cache the --locale argument and somehow pass it
down into our svn_utf_* routines.

Am I correct?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jul 10 23:35:41 2002

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.