[Dojo-interest] Re: compressor and utf-8 again...

Adam L. Peller adam at peller.org
Tue Jan 16 07:33:41 MST 2007


Hi Daniel.

Changed, yes.  Corrupted, I don't think so.

These contents are equivalent, will execute, and will always produce
the same results.  The compressor changed your file.  In this case, it
is larger.  OTOH, the output is normalized now and will work with any
encoding.

I suppose you could argue that it would be more compact if encoded, in
which case you'd have to also specify an output encoding to the
compressor somehow.  You can always file an enhancement request.
FWIW, this is a function of Rhino's output, not the JVM you're using
or the input encoding.

-Adam


On 1/16/07, Daniel Konczyk <drmartens at gnu.univ.gda.pl> wrote:
> Adam,
>
> On 15/01/07 23:23 -0500, Adam L. Peller wrote:
> > Works for me...
> >
> > $java -version
> > java version "1.5.0_06"
> > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-112)
> > Java HotSpot(TM) Client VM (build 1.5.0_06-64, mixed mode, sharing)
> >
> > $java -Dfile.encoding=UTF-8 -jar ../buildscripts/lib/custom_rhino.jar
> > -c test.js
> > var chars=new
> > Array("\xc0","\xe0","\xc1","\xe1","\xc2","\xe2","\xc3","\xe3","\xc4","\xe4","\xc5","\xe5","\u0102","\u0103","\u0100"
> > ...
>
> But what works for you?
> If the thing above is your output, I'd call it corrupted.
>
> What I expected is that the output is the same regarding the
> array contents... I don't want compressor to CHANGE my array
> contents. Why would anybody want that?
>
> But I have no clue why does it happen...
>
> Daniel
>


More information about the Dojo-interest mailing list