XML for module descriptor

Jeff MAURY jeffmaury at jeffmaury.com
Sat Apr 14 01:08:35 PDT 2012


Even if the module file is using a specific encoding, the
compilation/packaging of the jmod file can convert the file to the expected
encoding just like what is done for .java --> .class files and probably
what is done for MANIFEST.MF as well.

Jeff

On Sat, Apr 14, 2012 at 3:49 AM, Debasish Ray Chawdhuri <
debasish.raychawdhuri at gmail.com> wrote:

> 1. How do your java files specify encoding? Similarly we might try to
> externally specify encoding in case it is not our default UTF-8 with some
> form of -encoding option.
>
> 2. JSON can specify encoding if we modify the parser a little. I guess we
> would have to find something with a license compatible with GPL. We can
> modify it to read an optional first line { "encoding":"UTF-8",  if default
> encoding is not used. But I still would prefer the external option being
> passed to java compiler and java runtime.
>
> 3. The reason people do not complain about MANIFEST.MF being always in
> UTF-8 is that people hardly ever try to have class names and package names
> in non-ASCII characters, the encoding support for java files in mainly for
> string literals.
>
> It certainly does not make sense to have a complex parser like XML parser
> just because we want to support different encoding and we want the class
> names, package names and module names in non-ASCII characters.
>
> --
> Debasish Ray Chawdhuri
> <http://www.geekyarticles.com/>
>



-- 
Jeff MAURY


"Legacy code" often differs from its suggested alternative by actually
working and scaling.
 - Bjarne Stroustrup

http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury



More information about the jigsaw-dev mailing list