Re: Java Default Encoding and Royale Compiler

2017-12-04 Thread Harbs

The file in question was created by me on a Mac. An additional file which 
caused a problem on Yishay’s machine was StringTextLineFactory from TLF Lines 
443, 445 and 446 (in the comment) were output as garbage characters by the 
Royale compiler without explicitly setting the encoding to UTF-8.

A related issue is that unicode notation (i.e. \u2026)  is being evaluated and 
output as the actual unicode character which appears to be encoded wrong

> On Dec 4, 2017, at 7:36 AM, Alex Harui  wrote:
> 
> 
> 
> On 12/3/17, 3:08 AM, "Yishay Weiss"  wrote:
> 
>> JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8
>> 
>> Is there any reason not to hard code the file encoding in the compiler?
>> 
> I don't know for sure, but the first question that comes to mind is why
> Java itself hasn't bothered to default to a particular file encoding.
> 
> Also, especially for folks using Windows, what kinds of editors do you use
> and what file encoding do those editors use?
> 
> My 2 cents,
> -Alex
> 



RE: Java Default Encoding and Royale Compiler

2017-12-04 Thread Yishay Weiss
Java seems [1] to take the system encoding which can vary between windows and 
other machines.



My main editors are Eclipse (FB) and vim, Eclipse is set to use UTF-8 while vim 
is using latin1 by default. But in any case, these are easily configurable so I 
don’t see the harm in requiring users to encode to UTF-8.



[1] 
https://stackoverflow.com/questions/1006276/what-is-the-default-encoding-of-the-jvm




From: Alex Harui <aha...@adobe.com.INVALID>
Sent: Monday, December 4, 2017 7:36:50 AM
To: dev@royale.apache.org
Subject: Re: Java Default Encoding and Royale Compiler



On 12/3/17, 3:08 AM, "Yishay Weiss" <yishayj...@hotmail.com> wrote:

>JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8
>
>Is there any reason not to hard code the file encoding in the compiler?
>
I don't know for sure, but the first question that comes to mind is why
Java itself hasn't bothered to default to a particular file encoding.

Also, especially for folks using Windows, what kinds of editors do you use
and what file encoding do those editors use?

My 2 cents,
-Alex