Able to reproduce - for example try to open /bin/cat in gedit:

$ file /bin/cat
/bin/cat: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for 
GNU/Linux 2.6.8, dynamically linked (uses shared libs), stripped

$ gedit /bin/cat

Expected: file opens in gedit and a lot of unprintable characters gets
shown.

Actual:
Unclear error message appears stating "Could not open the file /bin/cat using 
the Unicode (UTF-8) character encoding." "Please check that you are not trying 
to open a binary file.
Select a different character coding from the menu and try again."

A checkbox with default UTF-8 encoding and alternative Western ISO
appears. Choosing ISO doesn't help.

Compare with vi /bin/cat which shows a lot of squares mixed with
printable characters.

Side note: if I create a short text file with a non-printable character,
it can be open using gedit but gedit assumes some weird asian encoding.
See:

$ echo -e "Hello\nW\000rld" > ~/foo

$ od -cx ~/foo
0000000   H   e   l   l   o  \n   W  \0   r   l   d  \n
        6548 6c6c 0a6f 0057 6c72 0a64
0000014

$ file ~/foo
foo: data

$ vi ~/foo

- this works as expected

$ gedit ~/foo

- this shows 效汬੯W汲੤

-- 
Can't open a binary file
https://bugs.launchpad.net/bugs/282164
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to