gedit can't open a txt file

Bug #1067915 reported by Simplehuman
54
This bug affects 12 people
Affects Status Importance Assigned to Milestone
gedit (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

I have a txt file with a list of pages of different sites (related to my work). It is generated by Firefox plugin "Webmaster Sape".
When I try to open it with gedit I see an error message: "Unknown error: Invalid byte sequence in conversion input".

But for ex. Geany and LibreOffice Writer open it without any problems.

File is attached.

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: gedit 3.6.0-0ubuntu1
ProcVersionSignature: Ubuntu 3.5.0-17.28-generic 3.5.5
Uname: Linux 3.5.0-17-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.6.1-0ubuntu3
Architecture: amd64
Date: Thu Oct 18 00:40:24 2012
ExecutablePath: /usr/bin/gedit
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Beta amd64 (20121006)
ProcEnviron:
 LANGUAGE=ru_UA:ru
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=ru_UA.UTF-8
 SHELL=/bin/bash
SourcePackage: gedit
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Simplehuman (simplehuman) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gedit (Ubuntu):
status: New → Confirmed
Revision history for this message
Matt White (mfwhite5) wrote :

Just upgraded to Quantal a week ago. Used gedit to edit a text file this morning and it worked fine. Restarted my computer and then tried to edit the same file again and got "Unexpected error: Invalid byte sequence in conversion input."

There shouldn't be any strange characters in the file.

Revision history for this message
Matt White (mfwhite5) wrote :

Bizarre workaround for this bug: cat the file from the command line and then copy and paste it back into a new text file in gedit. I had to copy-paste-save it in sections, because if I pasted the entire document into gedit all at once, the invalid byte sequence error remained.

Revision history for this message
Matt White (mfwhite5) wrote :

I am continuing to get this error on files that used to be able to be opened by gEdit. Here's an error message that is logged relating to this:

** (gedit:13182): WARNING **: Hit unhandled case 1 (Invalid byte sequence in conversion input) in parse_error.

Revision history for this message
Chriki™ (chrikitm) wrote :

I’ve been facing a similar issue. For me the problem was that the encoding of the file had changed since it was last opened with Gedit (from WINDOWS-1252 to UTF-8). As I had manually set the encoding when first opening the file, Gedit had saved this information and tried to reuse it the next time I opened the file after the encoding change; this resulted in said error message.

To fix the problem, I had to remove the saved encoding information from the gvfs metadata like so:

    gvfs-set-attribute --type unset MY_FILE.txt 'metadata::gedit-encoding'

I have posted more information on this at <http://askubuntu.com/a/279820/137449>.

Revision history for this message
Simplehuman (simplehuman) wrote :

It is still actual, any attention to this bug?

Changed in gedit (Ubuntu):
status: Confirmed → Fix Released
status: Fix Released → Confirmed
Revision history for this message
Dmitry Shachnev (mitya57) wrote :

What you attached is not a .txt file, but rather a .tar.gz archive containing a .txt file. After unpacking it Gedit opens it fine:

zcat wmsape-list.txt.tar.gz > wmsape-list.txt.tar
tar xf wmsape-list.txt.tar
gedit wmsape-list.txt

Revision history for this message
Sebastien Bacher (seb128) wrote :

the txt is not a text, it's a compress archive rather, that's not a bug

Changed in gedit (Ubuntu):
importance: Undecided → Low
status: Confirmed → Invalid
Revision history for this message
Simplehuman (simplehuman) wrote :

Yes, it is .tar.gz archive with a .txt file, wich is NOT opening with gEdit, but is opening normally wil another text redactors (Geany, Writer, etc.)
So the bug is not invalid

Changed in gedit (Ubuntu):
status: Invalid → Confirmed
Revision history for this message
Simplehuman (simplehuman) wrote :

I'm attaching this txt file without compression...

Revision history for this message
Sebastien Bacher (seb128) wrote :

sorry, I misunderstood the previous comment, that's a duplicate of bug #575500 then

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

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