This page is no longer maintained — Please continue to the home page at www.scala-lang.org

name garbling after retrieving from SVN to Windows

3 replies
Miguel Garcia
Joined: 2009-06-10,
User offline. Last seen 42 years 45 weeks ago.

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

extempore
Joined: 2008-12-17,
User offline. Last seen 35 weeks 3 days ago.
Re: name garbling after retrieving from SVN to Windows

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.

Joshua.Suereth
Joined: 2008-09-02,
User offline. Last seen 32 weeks 5 days ago.
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.
>

milessabin
Joined: 2008-08-11,
User offline. Last seen 33 weeks 3 days ago.
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

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland