creadur-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <>
Subject Re: RAT-190 - default encoding UTF-8 / patch / what should be implemented?
Date Mon, 23 Feb 2015 23:53:53 GMT
On 23 February 2015 at 20:31, P. Ottlinger <> wrote:
> Hi *,
> thanks for all your input.
> Am 19.02.2015 um 11:30 schrieb Jochen Wiedmann:
>> My personal believe is, that a default doesn't make sense at all.

I tend to agree here.
But the behaviour on various systems needs to be checked.

>> Whatever you choose, you'll find people that cannot use it. For
>> example, in the case of UTF-8, I am quite certain that it will be
>> wrong for western europeans, like you and me.
> I don't really see your point in that - most *nix operating systems have
> UTF-8 as default encoding. The sense of UTF-8 is to provide a relatively
> broad compatibility in contrast to US-ASCII/CP1292 or other reduced
> charsets. Since UTF-16 exists UTF-8 is a compromise that should work for
> the majority of users - IMHO.

Probably does not work for MacOSX or Windows users.

This needs to be checked.

>> The only change, that I'd be in favour of would be to enforce an
>> explicit encoding. Or, in other words, throw an exception, if an
>> encoding (aka charset) isn't explicitly choosen.
> What do you think of adding two more configuration options in the
> mvn-plugin:
> defaultLocale - defaults to Locale.US

Why US?
What is the Locale used for?
And why should it differ from the user's Locale?

> defaultEncoding - defaults to UTF-8

Only if it can be shown to be useful on non-US non-Unix systems.

> With that a user wanting to use a reduced charset or with mixed contents
> to use RAT on could configure it.
> I'd like to replace all UTF-8 in the code with the value of that
> default. Same applies for Locale?
> This would at least make it transparent what is going on.
> Just as a quick reminder: a user ran RAT in a CP1292 encoded environment
> and did not find license matches in a UTF-8 encoded file.
> If mvn ran with UTF-8 via -Dfile.encoding=UTF-8 everything was fine and
> RAT was able to match.
> The to my mind correct assertion of the RAT user is to either provide
> meaningful defauls or make it possible to configure encoding-specific stuff.
> What do you think about adding those 2 options with above defaults?
> Cheers,
> Phil

View raw message