Am 04.07.2017 um 19:16 schrieb Emmanuel Bourg:
> Le 4/07/2017 à 17:45, Markus Koschany a écrit :
> 
>> I think it is very important that the encoding is handled consistently
>> by all build tools. I wanted to fix this for a while now because too
>> many times I had to specify UTF-8 explicitly and the build system tried
>> to use ASCII. UTF-8 is the de-facto standard encoding in Debian and
>> should be a first class citizen in Debian Java too. Thus said I don't
>> want to force this on you. Just give me some hints where I have to look
>> in the javahelper package and I experiment with the available options
>> myself.
> 
> I'm all for consistency and UTF-8 everywhere, but in this case it brings
> absolutely no benefit. This will just result in package updates
> reverting the encoding to ISO-8859-1. In the end this will not really
> advance the UTF-8 cause.

I understand what you intend to say. Even if UTF-8 was the default,
libidw-java would require an override with ISO-8859-1 encoding. However
we are talking about the general case. What is more likely that a Java
project contains an UTF-8 encoded character or ISO-8859-1 character in
2017? How many Chinese characters are ISO-8859-1 encoded? And by the way
the Euro symbol or French special characters are only present in
ISO-8859-15. Let's choose UTF-8 as the default and fix packages that
don't (but really should) use UTF-8.

> This is where the default encoding is specified for jh_build if you want
> to modify it:
> 
>   https://sources.debian.net/src/javatools/0.61/jh_build/#L54
>   https://sources.debian.net/src/javatools/0.61/jh_build/#L74
> 
>> Lately I haven't discovered any issues in Maven, so the above might be
>> true. Though I still don't understand why there is an ASCII fallback in
>> Maven and maybe other Java tools. It appears to be completely
>> anachronistic.
> 
> Maven doesn't fallback to ASCII, it just uses the default platform
> encoding, and on the builders it's ASCII. The day the builders switch to
> UTF-8 Maven will also use it by default.

Now I'm quite puzzled. The builders set the ASCII encoding? I have seen
this issue on my system before and I don't use ASCII encoding. There
must be a way to always force Maven to use something else than ASCII. I
don't believe this is architecture-dependent.

I have the feeling we are going round in circles. This bug is about a
"unmappable character" build failure. They regularly occur and I
remember that people previously asked for assistance to solve them. Your
solution was to set the default encoding in javahelper to ISO8859-1. [1]
Then I suggested to use UTF-8 instead because this is obviously the
superior encoding. I see your point but I still think the better default
is UTF-8. I hope tony will read this and find some better arguments
because he is also in favor of UTF-8. :)

By the way how are people supposed to override the JH_JAVAC_OPTS
variable. I just tried

export JH_JAVAC_OPTS="-encoding UTF-8" in libidw-java but this doesn't
really seem to work. Inability can't be ruled out though..

I also did remember how I fixed "unmappable character"-bugs before. I used:

export JAVA_TOOL_OPTIONS=-Dfile.encoding=iso-8859-1

for javahelper projects.

To be honest I didn't expect that much resistance against using UTF-8.

[1]
https://anonscm.debian.org/cgit/pkg-java/javatools.git/commit/?id=baff5c8


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to