Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: [PATCH/RFC] Change t0204-gettext-reencode-sanity.sh to pass under Mac OSX

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:53:13

Torsten Bögershausen [off-list ref] writes:

Swapping to: and cc: as Torsten is not the primary "guilty party" on
this one.
t0204 tries to use a ISO-8859-1 locale and expects that characters
outside the ISO-8859-1 code range are converted in "question marks".

The gettext under Mac OS X ignores the ISO-8859-1 locale and uses
UTF-8 anyway.
...
Let the test pass when UTF-8 is returned.
This is insane.  Is passing this test *that* important to the point
that you would need to change the passing criteria, instead of
fixing the behaviour of the code being tested?

It looks like these tests prepare *.mo files based on UTF-8 *.po
files, and ask the system iconv machinery to show them in UTF-8 and
non UTF-8 locales.  And the conversion is an impossible one in this
case, as the messages won't fit in iso-8859-1.

Some platforms may be capable of noticing that and fill them with
question marks, and some others may notice the impossible request
but do something other than "question marks", and yet some others
may not even notice iso-8859-1 is requested and spit out the
original UTF-8 verbatim.

I do not see any reason to insist that their fallback behaviour must
be to fill them with question marks.  In other words, I simply do
not see the point of this test and the original "pass runs of
question" to begin with, and this patch makes things even worse.

Why not get rid of this single test that only tries to check the
output for an impossible request?

Ævar, am I missing something?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help