Hi Nicolas,
When the file command shows us-ascii it
means that all the file is composed by the set of 128 characters
common ascii characters.
This is the ideal case as basically all
editors, printers, etc can interpret these character set without
problems
Now, when you execute the file command,
and it shows UTF-8, it means that the file contains characters
beyond those commonest 128 characters.
That becomes a problem when
distributing the sources, because for example I write my code in
UTF-8, but your eclipse is configured with ISO-8859 - then it will
show garbage in the position of the strange characters.
And also happens the opposite, when
somebody write using ISO-8859 (for example), people reading the
code in eclipse configured as UTF-8 will see garbage.
BTW, I guess since the origin of the
project when adempiere started and copied the source from compiere
some (if not all) the UTF-8 core files got corrupted.
Look for example the file
org.adempiere.base/src/org/compiere/model/MCurrency.java line 285
Seems like that was corrupted since
revision 5 of the project.
Or probably it was broken on compiere
also, because I see the same problem in their sources.
That's the problem created when all
developers don't agree in one character set :-)
Also, for core, comments in non-english
languages are heavily discouraged (to not say forbidden) - this is
in part because of this character set issue, but mostly because
the maintainers must be able to read comments, and we that's
possible just establishing a common language.
Now, for your customizations, comments
with UTF-8 are OK, while everybody reads with the same character
set - but, in some cases properties and variable contents are
better to be translated to unicode-encoded notation - which is the
work that native2ascii does. That's bad for comments because it
makes them unreadable, but is good for variable contents and
properties file as it guarantees that characters are managed
correctly when executing.
Regards,
Carlos Ruiz
El 24/01/19 a las 8:56, Nicolas Micoud
escribió: