- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
name garbling after retrieving from SVN to Windows
Mon, 2009-08-24, 17:40
Talking about Predef, using the default text file encoding (under Windows,
Cp1252) Eclipse displays a garbled method name (2nd one below)
class ArrowAssoc[A](x: A) {
def -> [B](y: B): Tuple2[A, B] = Tuple2(x, y)
def â?'[B](y: B): Tuple2[A, B] = ->(y)
}
Miguel
--
Miguel Garcia miguel.garcia@tuhh.de
Institute for Software Systems (STS), E-16
Technische Universitaet Hamburg-Harburg
Harburger Schlossstr. 20, 21073 Hamburg Fax: (+49)40-42878-2515
http://www.sts.tu-harburg.de/people/mi.garcia
Tue, 2009-08-25, 02:47
#2
Re: name garbling after retrieving from SVN to Windows
Ouch. I believe eclipse on windows defaults to cp1252. I remember
the controls to make files UTF-8 are in a somewhat arcane place.
Sent from my iPhone
On Aug 24, 2009, at 12:58 PM, Paul Phillips wrote:
> On Mon, Aug 24, 2009 at 06:40:17PM +0200, Miguel Garcia wrote:
>> Talking about Predef, using the default text file encoding (under
>> Windows, Cp1252) Eclipse displays a garbled method name (2nd one
>> below)
>>
>> class ArrowAssoc[A](x: A) {
>> def -> [B](y: B): Tuple2[A, B] = Tuple2(x, y)
>> def â?'[B](y: B): Tuple2[A, B] = ->(y)
>> }
>
> In trunk at this moment source file encodings should default to UTF8
> if
> you don't take some trouble to change them, this being rather
> important
> since unicode is in the scala spec as you illustrate above. Hopefully
> you're talking about 2.7, which is more encoding buggy (and I have no
> idea what additional confounding factors eclipse throws into the mix.)
>
> If eclipse defaults to displaying scala source files in something
> other
> than UTF-8 (regardless of the default platform encoding) I would say
> that is a bug in the eclipse/plugin side. You should have to specify
> -encoding to scalac (or whatever the eclipse equivalent is) to
> change it.
>
Tue, 2009-08-25, 10:27
#3
Re: name garbling after retrieving from SVN to Windows
On Mon, Aug 24, 2009 at 5:58 PM, Paul Phillips wrote:
> If eclipse defaults to displaying scala source files in something other
> than UTF-8 (regardless of the default platform encoding)
Eclipse uses the default platform encoding, as do almost all Java applications.
> I would say that is a bug in the eclipse/plugin side. You should have to
> specify -encoding to scalac (or whatever the eclipse equivalent is) to
> change it.
Per-file encodings aren't yet implemented, but will be before 2.8.0.
Cheers,
Miles
On Mon, Aug 24, 2009 at 06:40:17PM +0200, Miguel Garcia wrote:
> Talking about Predef, using the default text file encoding (under
> Windows, Cp1252) Eclipse displays a garbled method name (2nd one
> below)
>
> class ArrowAssoc[A](x: A) {
> def -> [B](y: B): Tuple2[A, B] = Tuple2(x, y)
> def â?'[B](y: B): Tuple2[A, B] = ->(y)
> }
In trunk at this moment source file encodings should default to UTF8 if
you don't take some trouble to change them, this being rather important
since unicode is in the scala spec as you illustrate above. Hopefully
you're talking about 2.7, which is more encoding buggy (and I have no
idea what additional confounding factors eclipse throws into the mix.)
If eclipse defaults to displaying scala source files in something other
than UTF-8 (regardless of the default platform encoding) I would say
that is a bug in the eclipse/plugin side. You should have to specify
-encoding to scalac (or whatever the eclipse equivalent is) to change it.