GNOME Bugzilla – Bug 126513
STF Export converts charsets too little too often
Last modified: 2005-04-01 16:26:36 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.
Does libgsf have any utility or setting to do that?
I don't think it has, but it could have. It is conceptionally the same as the gzip layer.
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.
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.
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.
Created attachment 33846 [details] [review] Updated Patch
Fixed in cvs HEAD (in an entirely different manner).