| Sources with > 127 ascii literals [message #45744] | 
Sat, 31 May 2003 09:59   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
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 #46272 is a reply to message #45988] | 
Sun, 01 June 2003 16:14   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
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
 |  
 |  
  | 
Powered by 
FUDForum. Page generated in 0.58248 seconds