0

I have a notepad file. Well, its more of a .java file. The text is in Western MAC OS Roman (MacRoman) But when I save it, it gives me choices of how to encode it. Except, if I encode it, Java can't understand it! How can I have notepad NOT encode my files?

Tyler Durden
  • 11,156
  • 9
  • 64
  • 126
Flarp
  • 139
  • 1
  • 10
  • You mean encode I suppose. Why do you use notepad at all? – assylias Mar 07 '14 at 16:32
  • Go grab a copy of [Notepad2](http://www.flos-freeware.ch/notepad2.html) and call it good.. – Mike Christensen Mar 07 '14 at 16:38
  • @assylias Encode yes, and unfortunately Notepad is all I have right now, I am looking into alternative software. Like Mike Christensen recommended Notepad2. I haven't forgot you. – Flarp Mar 07 '14 at 17:14
  • @Flarp If you can use alternatives, why not install a proper IDE like eclipse, netbeans or intellij? – assylias Mar 07 '14 at 17:18
  • @assylias i haven't seen them before. Again, I am a serious noob, so I am trying to learn. But thanks for bringing those upon me. I think NetBeans look cool. – Flarp Mar 07 '14 at 17:21
  • @Flarp Netbeans is probably easier if you have never used an IDE before. It sort of works out of the box. – assylias Mar 07 '14 at 17:27

2 Answers2

1

You cannot save your file without any encoding at all.
Whatever you do, it is still encoded in some way.
I suggest you encode it in UTF-8, then every decent
editor (including Java IDEs) will understand it.

peter.petrov
  • 38,363
  • 16
  • 94
  • 159
  • So if notepad isn't good... what should I use? And off-topic, did my profile picture change? – Flarp Mar 07 '14 at 16:34
  • Notepad supports UTF-8. It is not an advanced editor but it works for me in some occasions :) Yes, your picture is changed now. – peter.petrov Mar 07 '14 at 16:36
1

If you are getting an encoding prompt, it is because there are non-ASCII characters in the text. Therefore, you must choose an encoding of some kind for those non-ASCII characters. You need to select an encoding which is understood by your IDE or whatever environment is loading the text. Normally, UTF-8 is understood by pretty much everything these days.

Tyler Durden
  • 11,156
  • 9
  • 64
  • 126