Martin von Gagern wrote:
if a newcomer like me is allowed to vote.

The more people participate in a discussion, the more likely is the result
to match public consensus rather than individual's preferences.

Suppose you have a huge source tree, mostly english ASCII, but somewhere
in there there is a single degree sign, '\u00b0'. How would you detect
it, short of scanning every ASCII file until you hit that one?

Exactly, if the automatic guessing should have any chance to deliver the
proper result, it's doomed to scan all the files and this is additional I/O.
Please remember, I/O is one of the most expensive operations in terms of
time, in particular with a Maven build being quite sequential.

You could of course write an encoding detection plugin which could examine
the code and set the required property accordingly.

Personally, I don't see the use case for that. If there are really users out
there that don't know what file encoding they are using when writing up
their sources, they are most probably happy with the proposed default value
of Latin-1. Alternatively, this encoding detection plugin could be as simple
as printing out the Java system property ${file.encoding} which obviously
worked well enough for the user.

For those users that know about file encoding, it won't be a problem to
specify this in the POM. In particular, those users will not fail to specify
the right encoding, unlike a dumb machine which merely tests whether a
particular byte stream obeys the syntax rules of an encoding.


Benjamin


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to