error: unmappable character for encoding ASCII

1,736 views
Skip to first unread message

Terrence Brannon

unread,
Mar 17, 2013, 10:12:20 AM3/17/13
to ceylon...@googlegroups.com
The default compilation settings lead to errors on my mac os x machine.


[~/prg/ceylon-dist/samples/helloworld]$ ceylon compile com.example.helloworld
/Users/admin/prg/ceylon-dist/samples/helloworld/source/com/example/helloworld/module.ceylon:17: error: unmappable character for encoding ASCII
by "St??phane ??pardaud"
      ^
/Users/admin/prg/ceylon-dist/samples/helloworld/source/com/example/helloworld/module.ceylon:17: error: unmappable character for encoding ASCII
by "St??phane ??pardaud"
       ^
/Users/admin/prg/ceylon-dist/samples/helloworld/source/com/example/helloworld/module.ceylon:17: error: unmappable character for encoding ASCII
by "St??phane ??pardaud"
              ^
/Users/admin/prg/ceylon-dist/samples/helloworld/source/com/example/helloworld/module.ceylon:17: error: unmappable character for encoding ASCII
by "St??phane ??pardaud"
               ^
ceylon compile: There was 1 error
[~/prg/ceylon-dist/samples/helloworld]$

Tako Schotanus

unread,
Mar 17, 2013, 10:19:29 AM3/17/13
to ceylon...@googlegroups.com
Actually the easiest way to test those examples would be to have "ant" installed so you could just run "ant" and it would compile and run the sample.

But if you don't have ant installed you could try the compile command again but with the following change:

$ ceylon compile --encoding UTF-8 com.example.helloworld

Cheers,
-Tako



-Tako


--
You received this message because you are subscribed to the Google Groups "ceylon-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceylon-users...@googlegroups.com.
To post to this group, send email to ceylon...@googlegroups.com.
Visit this group at http://groups.google.com/group/ceylon-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Gavin King

unread,
Mar 17, 2013, 11:01:07 AM3/17/13
to ceylon...@googlegroups.com
Please report this as a bug against ceylon-dist. Thanks.

On Sun, Mar 17, 2013 at 3:12 PM, Terrence Brannon
<thequie...@gmail.com> wrote:
> --
> You received this message because you are subscribed to the Google Groups
> "ceylon-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ceylon-users...@googlegroups.com.
> To post to this group, send email to ceylon...@googlegroups.com.
> Visit this group at http://groups.google.com/group/ceylon-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



--
Gavin King
gavin...@gmail.com
http://profiles.google.com/gavin.king
http://ceylon-lang.org
http://hibernate.org
http://seamframework.org

Tako Schotanus

unread,
Mar 17, 2013, 11:02:54 AM3/17/13
to ceylon...@googlegroups.com
It's not a bug. The sources are UTF-8 and he's on a Mac so he needs to tell the compiler to use the UTF-8 encoding.


-Tako

Gavin King

unread,
Mar 17, 2013, 11:07:23 AM3/17/13
to ceylon...@googlegroups.com
The sources should not contain non-UTF-8 characters. This is a
freaking helloworld.

Gavin King

unread,
Mar 17, 2013, 11:07:37 AM3/17/13
to ceylon...@googlegroups.com
I mean non-ASCII chars, of course.

Tako Schotanus

unread,
Mar 17, 2013, 11:08:26 AM3/17/13
to ceylon...@googlegroups.com
Tell Stef that ;)


-Tako

Gavin King

unread,
Mar 17, 2013, 11:12:52 AM3/17/13
to ceylon...@googlegroups.com
On Sun, Mar 17, 2013 at 4:08 PM, Tako Schotanus <ta...@codejive.org> wrote:
> Tell Stef that ;)

Yeah well I know Stef is very proud of his précious áccents, but not
trípping up new úsers on non-únix plátforms is góing to have to come
befóre his pride in this case.

--
Gávin King
vin.king@gmáil.com
http://prófiles.google.com/gávin.king
http://ceylón-lang.org
http://híbernate.org
http://seamfrámework.org

Tako Schotanus

unread,
Mar 17, 2013, 11:15:13 AM3/17/13
to ceylon...@googlegroups.com
I think the examples should just be signed "The Ceylon Team"


-Tako


Gavin King

unread,
Mar 17, 2013, 11:26:52 AM3/17/13
to ceylon...@googlegroups.com
I don't care who signs them, as long as their name can be represented
using 8-bit characters.

Tako Schotanus

unread,
Mar 17, 2013, 11:29:57 AM3/17/13
to ceylon...@googlegroups.com
Oh, they can be represented with 8-bit character, but then it will break on other OSes ;)




-Tako

Stéphane Épardaud

unread,
Mar 17, 2013, 1:44:48 PM3/17/13
to ceylon...@googlegroups.com
I agree with Gavin entirely here let s change that attribution and encoding.

Sent from my phone

Dheeraj Joshi

unread,
May 2, 2014, 7:20:22 PM5/2/14
to ceylon...@googlegroups.com
Hi Guys,
Even I'm facing the same issue of UTF-8 Encoding.
It says BUILD FAILED
error: unmappable character for encoding ASCII
Could you please help me in resolving this issue for setup ? 
Thank you
 

On Sunday, 17 March 2013 23:14:48 UTC+5:30, Stéphane Épardaud wrote:
I agree with Gavin entirely here let s change that attribution and encoding.

Sent from my phone


----- Reply message -----
From: "Tako Schotanus" <ta...@codejive.org>
To: <ceylon...@googlegroups.com>
Subject: [ceylon-users] error: unmappable character for encoding ASCII
Date: Sun, Mar 17, 2013 16:29


Oh, they can be represented with 8-bit character, but then it will break on other OSes ;)




-Tako


On Sun, Mar 17, 2013 at 4:26 PM, Gavin King <gavin...@gmail.com> wrote:
I don't care who signs them, as long as their name can be represented
using 8-bit characters.

On Sun, Mar 17, 2013 at 4:15 PM, Tako Schotanus <ta...@codejive.org> wrote:
> I think the examples should just be signed "The Ceylon Team"
>
>
> -Tako
>
>
> On Sun, Mar 17, 2013 at 4:12 PM, Gavin King <gavin...@gmail.com> wrote:
>>
>> On Sun, Mar 17, 2013 at 4:08 PM, Tako Schotanus <ta...@codejive.org> wrote:
>> > Tell Stef that ;)
>>
>> Yeah well I know Stef is very proud of his précious áccents, but not
>> trípping up new úsers on non-únix plátforms is góing to have to come
>> befóre his pride in this case.
>>
>> --
>> Gávin King

Lucas Werkmeister

unread,
May 3, 2014, 4:47:33 AM5/3/14
to ceylon...@googlegroups.com
Dheeraj: what operating system are you using, and how are your files encoded (is this still speck)? Do you have the correct encoding in the .ceylon/config file?

Stephane Epardaud

unread,
May 3, 2014, 8:48:47 AM5/3/14
to ceylon...@googlegroups.com

What exactly is your problem? The issue of samples encoding was fixed a while ago.

Dheeraj Joshi

unread,
May 4, 2014, 11:57:19 AM5/4/14
to ceylon...@googlegroups.com

Sorry for the late response guys (my email notifications were off :/ ),
I'm using Mac Os X.
I was trying to setup build and got the following error :


Ceylon/ceylon-common/src/com/redhat/ceylon/common/runtime/CeylonModuleClassLoader.java:8: error: unmappable character for encoding ASCII
   
[javac]  * @author St??phane ??pardaud <stef@epardaud.fr>
   
[javac]                       ^
   
[javac] 8 errors


BUILD FAILED
Ceylon/ceylon-dist/build.xml:328: The following error occurred while executing this line:
Ceylon/ceylon-common/build.xml:48: Compile failed; see the compiler error output for details.


Lucas, I haven't set encoding in .ceylon/config while?
Could you share the documentation which describes this(I might have missed this section) or share your file if possible.

Thank you

Lucas Werkmeister

unread,
May 4, 2014, 12:24:51 PM5/4/14
to ceylon...@googlegroups.com
Oh, that’s a javac error! Not what I expected – In that case, your Ceylon config won’t help :D
Can you try running ant with a '-Dfile.encoding=UTF8' argument?
If that works, we need a way to enforce that all the time. This StackOverflow answer might be helpful.

(Also, for what it’s worth, I was referring to this, but as I said, it won’t help in this case.)

Dheeraj Joshi

unread,
May 4, 2014, 3:01:59 PM5/4/14
to ceylon...@googlegroups.com
Hey Lucas,
That helped by appending '-Dfile.encoding=UTF8' to the ant command.

Thank a lot :)

Lucas Werkmeister

unread,
May 4, 2014, 4:25:58 PM5/4/14
to ceylon...@googlegroups.com
You’re welcome! I just submitted a pull request to the ceylon-common repository to fix this (#40); could you please test it? (You are @djadmin on Github, right?)
Reply all
Reply to author
Forward
0 new messages