Problem opening UNICODE file

Bug #1010402 reported by Aurele Theriault
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gedit (Ubuntu)
Expired
Low
Unassigned

Bug Description

lsb_release -rd
Description: Ubuntu 12.04 LTS
Release: 12.04

apt-cache policy gedit
gedit:
  Installé : 3.4.1-0ubuntu1
  Candidat : 3.4.1-0ubuntu1
 Table de version :
 *** 3.4.1-0ubuntu1 0
        500 http://ca.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status

What you expected to happen
gedit to open file

What happened instead
gedit has problem opening attached RawText file test.rc generated by Windows 7; edit displays:
"There was a problem opening the file /mnt/hgfs/vmware/test/test.rc.
The file you opened has some invalid characters. If you continue editing this file you could corrupt this document.
You can also choose another character encoding and try again."

MOST IMPORTANT INFO:
After opening file test.rc with Windows' Notepad and removing 'END' at line 387, then saving file, gedit can open file without any problem. After re-adding 'END' at line 387 (using gedit or Notepad) and saving file, gedit can no longer open file.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: gedit 3.4.1-0ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-24.39-generic 3.2.16
Uname: Linux 3.2.0-24-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.0.1-0ubuntu8
Architecture: amd64
Date: Fri Jun 8 05:37:04 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
ProcEnviron:
 LANGUAGE=fr_CA:fr
 TERM=xterm
 PATH=(custom, no user)
 LANG=fr_CA.UTF-8
 SHELL=/bin/bash
SourcePackage: gedit
UpgradeStatus: No upgrade log present (probably fresh install)

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

Thank you for taking the time to report this bug and helping to make Ubuntu better. The issue you are reporting is an upstream one and it would be nice if somebody having it could send the bug to the developers of the software by following the instructions at https://wiki.ubuntu.com/Bugs/Upstream/GNOME. If you have done so, please tell us the number of the upstream bug (or the link), so we can add a bugwatch that will inform us about its status. Thanks in advance.

Changed in gedit (Ubuntu):
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

Confirming, the file is a bit weird though, "less" says it's a binary file and display it garbagged as well where "cat" displays it fine

Revision history for this message
Aurele Theriault (aureletheriault) wrote :

The whole point is that this file (resource file generated by Visual C++) does not appear to contain any invalid character.

After opening file test.rc with Windows' Notepad and removing 'END' at line 387, then saving file, gedit can open file without any problem. After re-adding 'END' at line 387 (using gedit or Notepad) and saving file, gedit can no longer open file. That is what is really weird about it.

Revision history for this message
Aurele Theriault (aureletheriault) wrote :

Here is the SAME file with only a few characters removed in one of the strings. And gedit opens it perfectly!

So definetely a bug in gedit when dealing with RawText binary files.

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

well, I don't know about that .rc format but firefox says it's a binary and not a text format

same on the command line

$ less test-2.rc
"test-2.rc" may be a binary file. See it anyway?

somebody should open a bug upstream in any case, but whatever that format is, it's a bit different from standard plain text

Revision history for this message
Aurele Theriault (aureletheriault) wrote :

Files encoded UNICODE are identified by gedit as 'RawText' files. So, gedit has a problem opening 'some' UNICODE encoded files.

summary: - Problem opening RawText file
+ Problem opening UNICODE file
Revision history for this message
Sebastien Bacher (seb128) wrote :

Still would be useful to report to the people writing gedit... ;-)

Revision history for this message
madbiologist (me-again) wrote :

Does this still occur on Ubuntu 18.10 "Cosmic Cuttlefish" with gedit 3.30.2-0ubuntu0.18.10.2?

Changed in gedit (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for gedit (Ubuntu) because there has been no activity for 60 days.]

Changed in gedit (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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