shows no content on HTML file that has content

Bug #845482 reported by Eduard Gotwig
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Scratch
Fix Released
High
Unassigned

Bug Description

when I try to open my HTML file in homedirectory (~/treffen.html) , it shows me absolutly no content of the file in scratch. As it would be blank. When I open the file with gedit, I see the content.

On terminal:

gotwig@gotwig-ubuntu:~$ scratch treffen.html
[L_INFO 12:11:14.158328] [Application:79] Scratch version: 0.0.2
[L_INFO 12:11:14.169158] [Application:82] Kernel version:
[L_DEBUG 12:11:14.175277] [Settings:155] Loading settings from schema 'org.elementary.Scratch.SavedState'
[L_DEBUG 12:11:14.176509] [Settings:155] Loading settings from schema 'org.elementary.Scratch.Settings'
[L_DEBUG 12:11:14.183684] [Settings:155] Loading settings from schema 'org.elementary.Scratch.Services'
(null)[L_DEBUG 12:11:14.204361] [PluginManager:118] Loaded module source: '/usr/lib/scratch/plugins/core/libscratchpastebin.so'
Why do you want me to say "Example text"?
[L_WARN 12:11:14.455088] [Gtk] Theme parsing error: gtk-widgets.css:339:31: Expected an identifier
[L_WARN 12:11:15.243470] [Gtk] Theme parsing error: gtk-widgets.css:339:31: Expected an identifier
[L_FATAL 12:11:15.536813] [Gtk] gtk_text_buffer_emit_insert: assertion `g_utf8_validate (text, len, NULL)' failed
[L_FATAL 12:11:15.536959] Scratch will not function properly.

Eduard Gotwig (gotwig)
description: updated
Revision history for this message
Mario Guerriero (mefrio-g) wrote :

for me it works....if you open a file in another directory as in the Desktop directory dooes it work?

Revision history for this message
Eduard Gotwig (gotwig) wrote :

if it has also the same coding like that file, no, of course not... I also tried to edit the file over an FTP server. No content. This sucks very, becouse I´m a webmaster, and I would like to use scratch for editing.

Revision history for this message
Mario Guerriero (mefrio-g) wrote :

It is strange...I am looking for a probably fix but I can't verify it because I have not this problem!

Revision history for this message
xapantu (xapantu) wrote : Re: [Bug 845482] Re: shows no content on HTML file that has content

@Eduard: So, please attach a file which has this problem if you want a
fast fix ;)

Le vendredi 09 septembre 2011 à 17:21 +0000, Mario Guerriero a écrit :
> It is strange...I am looking for a probably fix but I can't verify it
> because I have not this problem!
>

Revision history for this message
Eduard Gotwig (gotwig) wrote :

Not only that file! Also other utf-8 files!.

Revision history for this message
Eduard Gotwig (gotwig) wrote :

This is the file. I also got problems with other files from the ubuntu seeds branch. normal readme file.

gotwig@gotwig-ubuntu:~/Spielecke/ubuntu$ scratch README
[L_INFO 10:42:55.695501] [Application:79] Scratch version: 0.0.2
[L_INFO 10:42:55.702374] [Application:82] Kernel version:
[L_DEBUG 10:42:55.732447] [Settings:155] Loading settings from schema 'org.elementary.Scratch.SavedState'
[L_DEBUG 10:42:55.752935] [Settings:155] Loading settings from schema 'org.elementary.Scratch.Settings'
[L_DEBUG 10:42:55.754119] [Settings:155] Loading settings from schema 'org.elementary.Scratch.Services'
(null)[L_DEBUG 10:42:55.992736] [PluginManager:118] Loaded module source: '/usr/lib/scratch/plugins/core/libscratchpastebin.so'
Why do you want me to say "Example text"?
[L_WARN 10:42:56.530351] [Gtk] Theme parsing error: gtk-widgets.css:339:31: Expected an identifier
[L_WARN 10:42:57.904572] [Gtk] Theme parsing error: gtk-widgets.css:339:31: Expected an identifier
[L_FATAL 10:42:58.286058] [Gtk] gtk_text_buffer_emit_insert: assertion `g_utf8_validate (text, len, NULL)' failed
[L_FATAL 10:42:58.288539] Scratch will not function properly.

Revision history for this message
Eduard Gotwig (gotwig) wrote :

Here is the README file

Revision history for this message
xapantu (xapantu) wrote :

In the README, the problem is the "ë" in the first line.

Revision history for this message
xapantu (xapantu) wrote :

And this file is not in utf-8, we'll need a better system to open a file, we can't use FileUtils.get_contents (which is a useful function, but not powerful enough for scratch).

Revision history for this message
Mario Guerriero (mefrio-g) wrote :

so xapantu what do you seggest?

Revision history for this message
xapantu (xapantu) wrote :

I don't know, I was just investigating. I suppose we could use something
like FileInputStream.

Changed in scratch:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Mario Guerriero (mefrio-g) wrote :

I tryed to use the convert function in GLib but I don't know how to get the file encoding. Another solution should be the function locale_to_utf8 from GLib but it doesn't work

Revision history for this message
Eduard Gotwig (gotwig) wrote :

When I now open the file I get segfault:

scratch treffen.html
[L_INFO 10:45:27.294167] [Application:79] Scratch version: 0.0.2
[L_INFO 10:45:27.294657] [Application:82] Kernel version:
[L_DEBUG 10:45:27.296117] [Settings:155] Loading settings from schema 'org.elementary.Scratch.SavedState'
[L_DEBUG 10:45:27.297188] [Settings:155] Loading settings from schema 'org.elementary.Scratch.Settings'
[L_DEBUG 10:45:27.298346] [Settings:155] Loading settings from schema 'org.elementary.Scratch.Services'
(null)[L_DEBUG 10:45:27.311060] [PluginManager:118] Loaded module source: '/usr/lib/scratch/plugins/core/libscratchpastebin.so'
Why do you want me to say "Example text"?
[L_WARN 10:45:27.493157] [Gtk] Theme parsing error: gtk-widgets.css:339:31: Expected an identifier
[L_WARN 10:45:28.387062] [Gtk] Theme parsing error: gtk-widgets.css:339:31: Expected an identifier
[L_FATAL 10:45:28.473926] [GLib] g_convert: assertion `str != NULL' failed
[L_FATAL 10:45:28.474048] Scratch will not function properly.
Segfault

Revision history for this message
Eduard Gotwig (gotwig) wrote :

Shouldnt the importance be higher?

Revision history for this message
Mario Guerriero (mefrio-g) wrote :

Yes this is a big problem! I am working for fix it but I think Vala does not support the non utf8 strings :(

Changed in scratch:
importance: Medium → High
Revision history for this message
Eduard Gotwig (gotwig) wrote :

I think it supports it somehow... I mean, GNOME supports it :/

Changed in scratch:
milestone: none → decameron
Revision history for this message
xapantu (xapantu) wrote :

Now, it is partially fixed, but only for iso-8859-1 files. (So, it won't work for all the others encoding I suppose.)

Changed in scratch:
status: Confirmed → Fix Committed
Changed in scratch:
status: Fix Committed → Fix Released
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.