creadur-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "P. Ottlinger" <>
Subject Re: RAT-190 - default encoding UTF-8 / patch / what should be implemented?
Date Mon, 23 Feb 2015 20:31:08 GMT
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.
> 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.

> 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

defaultLocale - defaults to Locale.US
defaultEncoding - defaults to UTF-8

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?


View raw message