After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 126513 - STF Export converts charsets too little too often
STF Export converts charsets too little too often
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: import/export Text
git master
Other All
: Normal normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2003-11-08 19:24 UTC by Morten Welinder
Modified: 2005-04-01 16:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed Patch (4.32 KB, patch)
2004-11-16 15:24 UTC, Andreas J. Guelzow
none Details | Review
Updated Patch (4.98 KB, patch)
2004-11-16 16:38 UTC, Andreas J. Guelzow
none Details | Review

Description Morten Welinder 2003-11-08 19:24:15 UTC
Charset conversion is inside stf_export_cell, i.e., it is done for each
cell.  In particular, it is not done for terminators and separators.

It should be done at the whole-buffer level, possibly in libgsf.
Comment 1 Andreas J. Guelzow 2004-11-14 17:55:20 UTC
Does libgsf have any utility or setting to do that?
Comment 2 Morten Welinder 2004-11-14 19:42:02 UTC
I don't think it has, but it could have.  It is conceptionally the same as the
gzip layer.
Comment 3 Andreas J. Guelzow 2004-11-16 15:24:17 UTC
Created attachment 33843 [details] [review]
Proposed Patch

This patch makes sure that all characters writtten are converted to the correct
encoding. We should save the use_charset string rather than recreate it
repeatedly but since that could create bugs it ought to wait until post 1.4. I
think this patch could be applied now.
Comment 4 Morten Welinder 2004-11-16 15:49:48 UTC
IMHO, this can wait until after 1.4.0

Couldn't you get rid of encoded_text in the caller?

It also looks like stf_export_write_text should take a GString so it wouldn't
have to call strlen.
Comment 5 Andreas J. Guelzow 2004-11-16 16:05:52 UTC
No problem with waiting until after 1.4.0.

encoded_text in the caller? It's not supposed to be there, considering it is
never really used.

If stf_export_write_text would take a GString we would have to create one for
every separator and linefeed. That seems to be overkill. But we may be able to
pass the strlen into stf_export_write_text, since we already have it for the cells.
Comment 6 Andreas J. Guelzow 2004-11-16 16:38:18 UTC
Created attachment 33846 [details] [review]
Updated Patch
Comment 7 Morten Welinder 2005-04-01 16:26:36 UTC
Fixed in cvs HEAD (in an entirely different manner).