Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Sources with > 127 ascii literals
Sources with > 127 ascii literals [message #45744] Sat, 31 May 2003 13:59 Go to next message
Igor Gatis is currently offline Igor GatisFriend
Messages: 4
Registered: July 2009
Junior Member
Hi,

I was developing a application under WinXP that contains litarals with
greater then 127 ascii code (tipically latin words). It compiles well.
When I imported the project under Linux, there are some compiler errors
and some characters are not shown. I used another text editor (unix vi)
and that chars still there. Does anyone knows what's the problem and how
to solve it?

here some code example:
// Under WinXP
class A {
char foo(char ch) {
String str = "prêmios";
switch (ch) {
case 'á' return 'a';
case 'â' return 'a';
case 'ã' return 'a';
default: return ch;
}
}
}

// Under Linux
class A {
char foo(char ch) {
String str = "prmios"; // The char still there
switch (ch) {
case 'á' return 'a';
case '' return 'a'; // Error: duplicated case
case '' return 'a';
default: return ch;
}
}
}

If you navigate from keyboard, it seams the char still there because you
have to type twice to move from 'm' to 'r' in "prmios".

Thanks,
[]'s
Gatis
Re: Sources with > 127 ascii literals [message #45988 is a reply to message #45744] Sat, 31 May 2003 19:14 Go to previous messageGo to next message
Jon Skeet is currently offline Jon SkeetFriend
Messages: 67
Registered: July 2009
Member
Igor Gatis <igorgatis@hotmail.com> wrote:
> I was developing a application under WinXP that contains litarals with
> greater then 127 ascii code (tipically latin words).

There's no such thing as a "greater than 127 ascii code". ASCII has 128
values - 0 to 127.

I suggest you work out what encoding you *actually* mean, and set the
workbench preference (under Workbench | Editors) to use the right
encoding.

--
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet/
If replying to the group, please do not mail me too
Re: Sources with > 127 ascii literals [message #46272 is a reply to message #45988] Sun, 01 June 2003 20:14 Go to previous message
Igor Gatis is currently offline Igor GatisFriend
Messages: 4
Registered: July 2009
Junior Member
Jon Skeet wrote:
> Igor Gatis <igorgatis@hotmail.com> wrote:
> > I was developing a application under WinXP that contains litarals with
> > greater then 127 ascii code (tipically latin words).
>
> There's no such thing as a "greater than 127 ascii code". ASCII has 128
> values - 0 to 127.

Ok, I understood.


> I suggest you work out what encoding you *actually* mean, and set the
> workbench preference (under Workbench | Editors) to use the right
> encoding.
>
> --
> Jon Skeet - <skeet@pobox.com>
> http://www.pobox.com/~skeet/
> If replying to the group, please do not mail me too


Thanks, It solved my problem!
Igor Gatis
Previous Topic:which eclipse.?.? for product ideas/discussions
Next Topic:How can I foirce a stack trace on a running program within Eclipse
Goto Forum:
  


Current Time: Wed Jan 15 11:57:17 GMT 2025

Powered by FUDForum. Page generated in 0.01617 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top