Bug#812672: mkdocs locale error building djangorestframework

2016-01-25 Thread Vincent Bernat
 ❦ 26 janvier 2016 11:57 +1100, Brian May  :

> I probably should change the line from:
>
> LANG=C.UTF-8 mkdocs build && mv site docs.debian/html
>
> To something like:
>
> LANG=C.UTF-8 LC_CTYPE= LC_ALL= mkdocs build && mv site docs.debian/html


This may not apply to your case, but there is a localehelper package for
this kind of situations.
-- 
Make input easy to prepare and output self-explanatory.
- The Elements of Programming Style (Kernighan & Plauger)


signature.asc
Description: PGP signature


Bug#812672: mkdocs locale error building djangorestframework

2016-01-25 Thread Adam Borowski
On Tue, Jan 26, 2016 at 11:57:17AM +1100, Brian May wrote:
> Adam Borowski  writes:
> > My guess as to the cause of #812672 is that you have LC_CTYPE or LC_ALL set
> > to an ancient locale.  These variables override LANG, the order is
> > LC_ALL>LC_CTYPE>LANG.
> 
> I probably should change the line from:
> 
> LANG=C.UTF-8 mkdocs build && mv site docs.debian/html
> 
> To something like:
> 
> LANG=C.UTF-8 LC_CTYPE= LC_ALL= mkdocs build && mv site docs.debian/html

LC_ALL=C.UTF-8 is enough, it overrides the other variables.

-- 
A tit a day keeps the vet away.



Bug#812672: mkdocs locale error building djangorestframework

2016-01-25 Thread Adam Borowski
On Tue, Jan 26, 2016 at 11:29:07AM +1100, Brian May wrote:
> python3-click has checks to ensure it is called with a non-ASCII
> locale. Or if it is an ASCII locale, it raises a fatal error. Or at
> least it tries to raise a fatal error.
[...]
> The problem is that when building djangorestframework, I need to have a
> utf8 locale available. C.UTF-8 is fine. However, I don't think there is
> any guarantee (??) that a utf8 locale will be available when building
> packages. This I believe is the root cause of #812672.
> 
> So should I somehow be trying to get the UTF-8 locale (is this possible
> from debian/rules?)

C.UTF-8 is always available on Debian since a long time ago, precisely to
be a guaranteed UTF-8 locale.  It's included in the libc-bin package which
is Essential:yes.

My guess as to the cause of #812672 is that you have LC_CTYPE or LC_ALL set
to an ancient locale.  These variables override LANG, the order is
LC_ALL>LC_CTYPE>LANG.

> should I submit another bug report against
> python3-click saying that it really should work in ASCII environments?

My personal preference would be to drop support for non-UTF8 locales as soon
as possible.  They're a heap of work; that effort could be better spent
fixing remaining problems in UTF-8 locales.

-- 
A tit a day keeps the vet away.



Bug#812672: mkdocs locale error building djangorestframework

2016-01-25 Thread Brian May
Adam Borowski  writes:

> My guess as to the cause of #812672 is that you have LC_CTYPE or LC_ALL set
> to an ancient locale.  These variables override LANG, the order is
> LC_ALL>LC_CTYPE>LANG.

Interesting thought. Unfortunately, I can't tell from the supplied build
logs what these are set to.

I probably should change the line from:

LANG=C.UTF-8 mkdocs build && mv site docs.debian/html

To something like:

LANG=C.UTF-8 LC_CTYPE= LC_ALL= mkdocs build && mv site docs.debian/html

Just in case.
-- 
Brian May