? re: character coding in gedit

Asked by Tahser holmen on 2006-10-07

Trying to download an executable Java file and got the message that gedit could not detect character coding. Furthur asking me to check whether a binary file is to be opened. Suggests selecting a character file from the menu.

Where is the menu, how do I find it, what is a binary file and what is character coding?

Nonplussed

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu gedit Edit question
Assignee:
No assignee Edit question
Last query:
2006-10-07
Last reply:
2009-11-05

A binary file is generally one that only a machine and some really geeky people understand. If you opened up a binary file in a text editor (which is what gedit is) and looked at it, it would just look like garbage. Examples of "binary" files are jpegs, mp3s, pdf documents and so on.

Gedit is designed to allow you to open text files for viewing and editing. An executable Java file is a binary file so would look like rubbish if you opened it in Gedit (or any other text editor). An executable program is designed to be just that, executed, but the computer, not viewed by you.

The character encoding is something that gives the editor hints as to what characters (letters, numbers and so on) will be appearing in the document. Some documents are plain ASCII which means they likely have just Latin-1 text in them (English and some European languages for example). However if the text contains non-Latin-1 language text like Hebrew, Urdu or Simplified Chinese then the editor needs a hint to tell it what encoding was used to represent those characters.

(that's how I understand it anyway).

So, what you probably really wanted to ask was "how do I get this java program to run?". :)

Rather than click it in your browser, try right clicking and saving to a folder somewhere then follow whatever instructions were provided to execute it.

For example to execute a jar file I regularly use, I open a terminal up and type "java -jar <filename>" where <filename> is the name of the java executable that I want to run.

Hope that helps. If you want to know more, maybe you could tell us what Java program you're downloading?

Tahser holmen (vivtomh) said : #2

Thanks! I'll try the rt. click manouver.

Roland Burton (rwburton) said : #3

Hi I'm a really geeky person and I want to look at a file containing 16 bit characters (QString), some of them being ASCII and most of them, not. Gedit complains that my characters are binary, and won't let me look at them. Is there a coding for Gedit that lets me look at raw binary, preferably showing the ASCII as ASCII and the binary as perhaps hex numbers? Or should I be usings something other than Gedit? Do I have to write my own (shudder)? I don't really need to edit it, I just want to look at it.

Vu Do Quynh (vu-do-quynh) said : #4

Maybe you can install a program like Bless hex Editor or a similar "hexadecimal" editor from Add/Remove...

Roland Burton (rwburton) said : #5

Thanks, Bless is exactly what I need

...Roland

On Thu, 2009-11-05 at 17:24 +0000, Vu Do Quynh wrote:
> Question #2007 on gedit in ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/gedit/+question/2007
>
> Vu Do Quynh proposed the following answer:
> Maybe you can install a program like Bless hex Editor or a similar
> "hexadecimal" editor from Add/Remove...
>

Can you help with this problem?

Provide an answer of your own, or ask Tahser holmen for more information if necessary.

To post a message you must log in.