Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Avoiding Eclipse top-bit-set "mangling"
Avoiding Eclipse top-bit-set "mangling" [message #38342] Sun, 25 May 2003 12:50 Go to next message
Tim Tyler is currently offline Tim TylerFriend
Messages: 52
Registered: July 2009
Member
The Eclipse (2.1) editor apparently "mangles" several top-bit-set
characters - if you attempt to load a text file containing them and
then save it again.

My question is if there is any chance that there's a way around
this using a plug-in editing component - instead of the default
text editor - or perhaps by marking text files as binary -
or something.
--
__________
|im |yler http://timtyler.org/ tim@tt1.org
Re: Avoiding Eclipse top-bit-set "mangling" [message #38474 is a reply to message #38342] Sun, 25 May 2003 15:33 Go to previous messageGo to next message
Jon Skeet is currently offline Jon SkeetFriend
Messages: 67
Registered: July 2009
Member
Tim Tyler <tim@tt1.org> wrote:
> The Eclipse (2.1) editor apparently "mangles" several top-bit-set
> characters - if you attempt to load a text file containing them and
> then save it again.
>
> My question is if there is any chance that there's a way around
> this using a plug-in editing component - instead of the default
> text editor - or perhaps by marking text files as binary -
> or something.

What character set do you have as your default encoding? I would have
thought if you used ISO-8859-1 as the encoding, all should be well.

--
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet/
If replying to the group, please do not mail me too
Re: Avoiding Eclipse top-bit-set "mangling" [message #39440 is a reply to message #38474] Mon, 26 May 2003 13:28 Go to previous messageGo to next message
Tim Tyler is currently offline Tim TylerFriend
Messages: 52
Registered: July 2009
Member
"Jon Skeet" <skeet@pobox.com> wrote in message
news:MPG.193af2a4daa65b3b9897ec@news.eclipse.org...
> Tim Tyler <tim@tt1.org> wrote:
> > The Eclipse (2.1) editor apparently "mangles" several top-bit-set
> > characters - if you attempt to load a text file containing them and
> > then save it again.
> >
> > My question is if there is any chance that there's a way around
> > this using a plug-in editing component - instead of the default
> > text editor - or perhaps by marking text files as binary -
> > or something.
>
> What character set do you have as your default encoding? I would have
> thought if you used ISO-8859-1 as the encoding, all should be well.

I don't know how to find out what character set Eclipse is using -
or how to change it.

The hypothesis that encoding is involved seems fair - one of the
mangled characters is 0x8F - slap in the middle of the
"ASCII international danger zone".

The mangled characters are apparently all displayed by Eclipse as
rather large, empty grey rectangles - before it mangles them.

FWIW, I'm running on an international Sun 1.4.2 beta JDK.
--
__________
|im |yler http://timtyler.org/ tim@tt1.org
Re: Avoiding Eclipse top-bit-set "mangling" [message #41654 is a reply to message #39440] Wed, 28 May 2003 08:53 Go to previous messageGo to next message
Jon Skeet is currently offline Jon SkeetFriend
Messages: 67
Registered: July 2009
Member
Tim Tyler <tim@tt1.org> wrote:
> > What character set do you have as your default encoding? I would have
> > thought if you used ISO-8859-1 as the encoding, all should be well.
>
> I don't know how to find out what character set Eclipse is using -
> or how to change it.

Under Preferences, Workbench | Editors

> The hypothesis that encoding is involved seems fair - one of the
> mangled characters is 0x8F - slap in the middle of the
> "ASCII international danger zone".

Right. My guess is that it's using Cp-1252 at the moment then.

--
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet/
If replying to the group, please do not mail me too
Re: Avoiding Eclipse top-bit-set "mangling" [message #42327 is a reply to message #39440] Wed, 28 May 2003 02:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: KingD.tmicha.net

"Tim Tyler" <tim@tt1.org> wrote in message
news:bat4o4$3es$1@rogue.oti.com...
> "Jon Skeet" <skeet@pobox.com> wrote in message
> news:MPG.193af2a4daa65b3b9897ec@news.eclipse.org...
> > Tim Tyler <tim@tt1.org> wrote:
> > > The Eclipse (2.1) editor apparently "mangles" several top-bit-set
> > > characters - if you attempt to load a text file containing them and
> > > then save it again.
> > >
> > > My question is if there is any chance that there's a way around
> > > this using a plug-in editing component - instead of the default
> > > text editor - or perhaps by marking text files as binary -
> > > or something.
> >
> > What character set do you have as your default encoding? I would have
> > thought if you used ISO-8859-1 as the encoding, all should be well.
>
> I don't know how to find out what character set Eclipse is using -
> or how to change it.

Preferences > Workbench > Editors

> The hypothesis that encoding is involved seems fair - one of the
> mangled characters is 0x8F - slap in the middle of the
> "ASCII international danger zone".

It is not a danger zone, but the zone where Microsoft decided to "innovate"
and diverge from standard ISO8859-1.

> The mangled characters are apparently all displayed by Eclipse as
> rather large, empty grey rectangles - before it mangles them.

What exactly did you expect it to display for an 0x8F? If your encoding is
set to Cp1252 what you describe is eactly what I would expect to happen as
0x8F (along with 0x81, 0x8D, 0x90, and 0x9D) are undefined in Cp1252 and
therefore have no meaning. When reading in it is most likely converted to
the \uFFFD replacement character which is then converted to a ? upon
writing.

While the ISO8859-1 encoding probably will not change the value, I'm not
sure what you expect it to display there as it is a non-printable control
character.

> FWIW, I'm running on an international Sun 1.4.2 beta JDK.



--
Dale King
Re: Avoiding Eclipse top-bit-set "mangling" [message #42726 is a reply to message #42327] Thu, 29 May 2003 07:35 Go to previous message
Tim Tyler is currently offline Tim TylerFriend
Messages: 52
Registered: July 2009
Member
"Dale King" <KingD@tmicha.net> wrote in message
news:bb2vkg$i18$1@rogue.oti.com...
> "Tim Tyler" <tim@tt1.org> wrote:
> > "Jon Skeet" <skeet@pobox.com> wrote:
> > > Tim Tyler <tim@tt1.org> wrote:

> > > > The Eclipse (2.1) editor apparently "mangles" several top-bit-set
> > > > characters - if you attempt to load a text file containing them and
> > > > then save it again.
> > > >
> > > > My question is if there is any chance that there's a way around
> > > > this using a plug-in editing component - instead of the default
> > > > text editor - or perhaps by marking text files as binary -
> > > > or something.
> > >
> > > What character set do you have as your default encoding? I would have
> > > thought if you used ISO-8859-1 as the encoding, all should be well.
> >
> > I don't know how to find out what character set Eclipse is using -
> > or how to change it.
>
> Preferences > Workbench > Editors

Got it - the problem is now solved - thanks.

> > The mangled characters are apparently all displayed by Eclipse as
> > rather large, empty grey rectangles - before it mangles them.
>
> What exactly did you expect it to display for an 0x8F? [...]

I don't care what it displays - but I do care about the mangling.

The files I'm dealing with have a compressed section preceded by
a header - which is textual and (normally) editable.
--
__________
|im |yler http://timtyler.org/ tim@tt1.org
Previous Topic:Error state remains after a problem is fixed
Next Topic:How to import an exported project from a .zip file?
Goto Forum:
  


Current Time: Sat Jul 27 18:31:12 GMT 2024

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

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

Back to the top