pdf-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pdf-devel] Text module unit tests failing


From: Aleksander Morgado
Subject: Re: [pdf-devel] Text module unit tests failing
Date: Fri, 05 Sep 2008 10:34:35 +0200
User-agent: Thunderbird 2.0.0.16 (X11/20080724)

Hi gerel,

> Hey people in pdf-text-context.c line 133:
> ##
>   locale_name = gl_locale_name(LC_CTYPE, "LC_CTYPE");
> ###
> 
> This function gets called in my system and setlocale() too:
> ##
> gl_locale_name_posix (int category, const char *categoryname)
> {
>   /* Use the POSIX methods of looking to 'LC_ALL', 'LC_xxx', and 'LANG'.
>      On some systems this can be done by the 'setlocale' function itself.  */
> #if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined 
> HAVE_LOCALE_NULL
>   return setlocale (category, NULL);
> ###
> 
> And the man page for setlocale() says:
> ##
> On startup of the main program, the portable "C" locale is selected as default
> ###
> 
> And that's what the DEBUG info says right ?
> ##
>    libgnupdf: ***DEBUG BASE***:base/pdf-text-context.c:138: Invalid locale
>    info detected! 'C'
> ###

Yes, that's the normal behavior (getting 'C') when you don't call
setlocale(LC_ALL,"") (or if your locale environment variables are not
set) before calling gl_locale_name, but we are doing it in
pdf_text_context_init():

#if defined HAVE_SETLOCALE
  /* Set all categories of the locale */
  if(setlocale(LC_ALL, "") == NULL)
    {
      PDF_DEBUG_BASE("Error setting locale information in the process");
      return PDF_ETEXTENC;
    }
#endif

HAVE_SETLOCALE is correctly defined in config.h, that didn't change.

And the code of the text module hasn't changed since long ago. It's
quite weird, anyway.

I compared the last code in bazaar with an old copy I had (aug 5th,
which ran correctly all the text module tests) and I didn't see many
changes. At least none that could cause the tests to fail.

jemarch, did we download any relevant changes from gnulib?

Cheers,
-Aleksander




reply via email to

[Prev in Thread] Current Thread [Next in Thread]