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

Bug #848253 reported by Jg-jguk on 2011-09-12
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Fix Released
gedit (Ubuntu)

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
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)
SourcePackage: gedit
UpgradeStatus: No upgrade log present (probably fresh install)
 (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.


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
Changed in gedit:
status: Confirmed → Fix Released
Launchpad Janitor (janitor) wrote :
Download full text (7.6 KiB)

This bug was fixed in the package gedit - 3.18.1-1ubuntu1

gedit (3.18.1-1ubuntu1) xenial; urgency=medium

  * Newer upstream version and merge on Debian, includes those changes
    - code snippets plugin improvements (lp: #1335613)
    - implements a minimap widget (lp: #1302451)
    - don't close infobar after print preview is dismissed (lp: #929554)
    - some segfault fixes (lp: #928420)
    - save files even when backups can't be created (lp: #867923)
    - let you edit binary files (lp: #848253, #575500)
    - count underscores are part of a word (lp: #615506, #413360)
    - don't display warnings when saving after foccusing out (lp: #589906)
    - use correct printing margins (lp: #331077)
    - ctrl-T opens new tabs (lp: #301942)
    - hide print preview tooltips when moving the cursor (lp: #234711)
    - include word wrap option in the statusbar popover (lp: #118522)
  * debian/
    - don't Build-Depends on gnome-icon-theme-symbolic it's deprecated
    - gedit replaces gedit-common (<< 3.18.1-1ubuntu1)
    - updated the requirements
  * debian/patches/06_lp_401692.patch:
    - dropped, the change is included upstream now
  * debian/rules:
    - create compatiblity desktop file for upgraders
  * Remaining other changes
  * debian/rules:
    - Build without --Bsymbolic-functions to fix issues
  * debian/patches/0001-Use-the-OSX-menubar-layout-for-XFCE-Unity-etc.patch:
    - add traditional menubar (GNOME bug #741904)
  * debian/patches/02_add_keywords.patch:
    - Add new keywords for unity and gnome-shell
  * debian/patches/05_menu_label.patch:
    - Don't display in menu as "gedit Text Editor"
  * debian/patches/07_use_del_instead_ctrl_del.patch:
    - Use Delete, not Ctrl+Delete, to delete files in file browser
      side panel to match our Nautilus behavior (LP: #1163287)

  [ Lars Uebernickel ]
  * New upstream version (lp: #1339371)
  * debian/patches/01_gedit-bugreport-location.patch,
    - update for new desktop file name
  * debian/patches/03_no_gnu_gettext.patch,
    - refresh
  * debian/patches/disable-warnings.patch:
    - dropped - should be fewer deprecation warnings now
  * debian/patches/00git_state_property_type.patch,
    - dropped - applied upstream
  * debian/patches/git_zeitgeist_crash.patch:
    - dropped - moved to ge...


Changed in gedit (Ubuntu):
status: Triaged → Fix Released
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.