Ubuntu

Gedit won't let me edit binary files to look for text

Reported by Jg-jguk on 2011-09-12
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
gedit
Confirmed
Wishlist
gedit (Ubuntu)
Wishlist
Unassigned

Bug Description

Gedit won't let me view/edit text files it cant figure out the charset of files it cannot work out the charset of.

All other editors let you open binary files, and see if you recognise any strings etc.

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: gedit 2.30.4-2ubuntu1
ProcVersionSignature: Ubuntu 2.6.38-11.48-generic-pae 2.6.38.8
Uname: Linux 2.6.38-11-generic-pae i686
Architecture: i386
Date: Mon Sep 12 21:27:48 2011
ExecutablePath: /usr/bin/gedit
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release i386 (20110427.1)
ProcEnviron:
 LANGUAGE=en_GB:en
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
SourcePackage: gedit
UpgradeStatus: No upgrade log present (probably fresh install)
XsessionErrors:
 (nautilus:1315): Gdk-CRITICAL **: IA__gdk_window_get_screen: assertion `GDK_IS_WINDOW (window)' failed
 (nautilus:1315): Gtk-CRITICAL **: IA__gtk_drag_set_icon_pixmap: assertion `!mask || gdk_window_get_screen (mask) == screen' failed
 (nautilus:1315): Gdk-CRITICAL **: IA__gdk_window_get_screen: assertion `GDK_IS_WINDOW (window)' failed
 (nautilus:1315): Gtk-CRITICAL **: IA__gtk_drag_set_icon_pixmap: assertion `!mask || gdk_window_get_screen (mask) == screen' failed

Jg-jguk (jg-jguk) wrote :
Daniel Manrique (roadmr) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

Gedit is a text editor, therefore it stands to reason that it tries to "protect" users from accidentally opening a binary file in the editor, which might result in a less-knowledgeable user damaging it.

In order to get the functionality you need, may I suggest using a full-blown binary/hex editor such as ghex or bless. These are much better suited to the task.

Also, if all you need is to look at strings contained in a binary file, the "strings" command might be of help. You can use it to generate a text file without extraneous characters and then analyze that using gedit.

Please let me know if some of the programs I described help in fulfilling your requirement.

Thanks!

Changed in gedit (Ubuntu):
status: New → Incomplete
Jg-jguk (jg-jguk) wrote :

Hi there

Yes, I'm a dev, I use hexeditor and binutils' "strings" regularly. However, every text editor I have ever used has let me open a file containing unrecognised chars, it just shows [] etc. So I stick to my request! Windows or Mac don't have this limitation too BTW. KDE doesn't either, i switched to KWrite.
Thanks, Jon

Daniel Manrique (roadmr) on 2011-09-13
Changed in gedit (Ubuntu):
importance: Undecided → Wishlist
status: Incomplete → Confirmed
Daniel Manrique (roadmr) wrote :

I set this as Confirmed, with importance: Wishlist as it is a feature request. I also linked to an upstream bug from the gnome project, there has been some discussion as to whether to implement this feature.

Thanks for your report!

Changed in gedit:
importance: Unknown → Wishlist
status: Unknown → Confirmed
Changed in gedit (Ubuntu):
status: Confirmed → Triaged
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.