[Top][All Lists]
[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: |
Tue, 09 Sep 2008 10:04:48 +0200 |
User-agent: |
Thunderbird 2.0.0.16 (X11/20080724) |
Hoola Jose,
> > 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():
>
> Do that means that the initialization of the text module will fail if
> LC_ALL= C or LC_ALL = POSIX?
We need to know which is the correct LANG and COUNTRY of the user in the
text module, as a PDF string can contain that information embedded. What
we could do is just assume it to be "en_US" if none available.
We also need to know the 'host encoding' of the user from the locale. If
none available, we could assume it to be UTF-8.
But I don't usually like to make assumptions. It's probably better to
return an error code so that the user knows that the locale is not
correctly set.
>
> To have such locale configured is quite common. We should be able to
> communicate the user what the problem is, so would be good to add a
> new status return value to 'pdf_text_init' like
> 'PDF_E_BADLOCALE'. What do you think?
Sure, there is no problem to add that, but anyway it will break the unit
tests when LC_ALL=C.
Do you want me to add a sporadic flyspray task for this?
Cheers,
-Aleksander
- [pdf-devel] Text module unit tests failing, Aleksander Morgado, 2008/09/03
- Re: [pdf-devel] Text module unit tests failing, jemarch, 2008/09/03
- Re: [pdf-devel] Text module unit tests failing, gerel, 2008/09/04
- Re: [pdf-devel] Text module unit tests failing, Aleksander Morgado, 2008/09/05
- Re: [pdf-devel] Text module unit tests failing, gerel, 2008/09/05
- Re: [pdf-devel] Text module unit tests failing, jemarch, 2008/09/08
- Re: [pdf-devel] Text module unit tests failing,
Aleksander Morgado <=
- Re: [pdf-devel] Text module unit tests failing, gerel, 2008/09/09
- Re: [pdf-devel] Text module unit tests failing, Aleksander Morgado, 2008/09/09
- Re: [pdf-devel] Text module unit tests failing, gerel, 2008/09/09
- Re: [pdf-devel] Text module unit tests failing, jemarch, 2008/09/09
- Re: [pdf-devel] Text module unit tests failing, Aleksander Morgado, 2008/09/10
- Re: [pdf-devel] Text module unit tests failing, jemarch, 2008/09/10
- Re: [pdf-devel] Text module unit tests failing, pete, 2008/09/12
- Re: [pdf-devel] Text module unit tests failing, Aleksander Morgado, 2008/09/13
- Re: [pdf-devel] Text module unit tests failing, jemarch, 2008/09/13
- Re: [pdf-devel] Text module unit tests failing, Karl Berry, 2008/09/13