Working around disappearing files in Bluefish

Invoking Tidy from within Bluefish to pretty-print HTML usually works. Occasionally, however, the file disappears from the screen. No solution is known, but there are workarounds.

You know you have this problem if, when the file disappears from the screen, Bluefish prints to stdout:

Gtk-CRITICAL **: gtk_text_buffer_emit_insert: assertion `g_utf8_validate (text, len, NULL)’ failed

This is a GTK issue, not a Bluefish or Tidy issue. One reference suggests that the affected files “must have some high ASCII chars in there”. I know of no solution other than to await a bugfix, but there are workarounds.

Ideally, hunt down and replace the offending characters. This is sometimes easier said than done.

Alternatively, if you pretty-print the offending file from the command line:

tidy -indent -latin1 -f /dev/null -wrap 72 -m filename.html

…filename.html will be overwritten with a pretty-printed version. Any subsequent invocation of Tidy on the same file will cause it to disappear, however.

REFERENCES
Perhaps undecoded UTF-8 errors are related to this problem. Or maybe not.

Advertisements

About Warren Post

So far: Customer support guy, jungle guide, IT consultant, beach bum, entrepreneur, teacher, diplomat, over-enthusiastic cyclist. Tomorrow: who knows?
This entry was posted in Uncategorized and tagged , . Bookmark the permalink.

One Response to Working around disappearing files in Bluefish

  1. Pingback: Using Bluefish | A maze of twisty little passages

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s