Gnucash doesn't like UTF-8, and ubuntu has only utf8 locales

Bug #3370 reported by Davidaf
12
Affects Status Importance Assigned to Milestone
GnuCash
Expired
High
gnucash (Ubuntu)
Fix Released
Medium
MOTU

Bug Description

  I've a big gnucash file produced in Mandriva Linux with a non utf8 locale, ISO-8859-15 with spanish accents in acount names.

  Trying to open this file causes this characters been omited. There is same info related in this bug in Gnome bugzilla http://bugzilla.gnome.org/show_bug.cgi?id=112091

  The issue is Gnucash does not like open pre-utf-8 files in a utf-8 locale.
  A solution may be changing locale to es_ES.ISO-8859-1 in my case but ubuntu does not came with that locale and you get that the locale is not suported by the C library.
  A workaround to all this may be running dpkg-reconfigure locales, marking to generate the old locale (ISO-8859-15 for me) and as default the UTF-8 one. In gnucash Launcher the command line could be: "sh -c "LANG=es_ES.ISO-8859-1 /usr/bin/gnucash"

Changed in gnucash:
assignee: nobody → motu
assignee: nobody → motu
Revision history for this message
Alexandre Otto Strube (surak) wrote :

Davidaf, this was with older versions of both gnucash and ubuntu. Does this still happen with latest dapper builds?

Changed in gnucash:
status: Unconfirmed → Needs Info
Revision history for this message
Davidaf (davidaf) wrote :

Alexandre, I've tested with Dapper updated until today (2006/04/13) and the bug persist.
After launching gnucash and openning my accounting file, I could see the problem persist. Letters like "áéíóú" disapear, so "Informática" shows as "Informtica".
Using "LANG=es_ES.ISO-8859-1 /usr/bin/gnucash" produces the following gdk error:
Gdk-WARNING **: locale not supported by C library
and programs is in English but missing letters shows again.

Running dpk-reconfigure in Dapper does not offer the option to enable more locales as did in Breezy, insteed it regenerates previously enabled locales, so I don't know how to regenereate es_ES.ISO-8859-1 again.

Revision history for this message
Alexandre Otto Strube (surak) wrote :

That's unfortunate.

For re-generating locales, the best way to ask for support is on ubuntu mailing list or #ubuntu on irc.freenode.net. But you said in your first post that you used ISO-8859-15, and now tried to use es_ES.ISO-8859-1. Does it makes any difference for you? Can't you convert this file? This bug is not likely to be fixed upstream soon...

Revision history for this message
Davidaf (davidaf) wrote :

To see a final solution I suposse the we'll have to wait to GTK-2 version of gnucash, whose develpment seems to have speeded up lately.

After trashing several hours I got it quite working in ubuntu Dapper. My language is Spanish which uses Western Eurepe charset ISO-8859-1. Since the Europen Economical Union the use of Euros, the € char was added to it, and named ISO-8859-15. So for me work with iso-8859-1 or iso-8859-15 are both acceptable solutions, with the first one lacking only € symbol.

To generate iso-8859-15 locales:
# locale-gen es_ES@euro

Using xfontsel can be seen there are few fonts installed in Dapper that include support to € symbol (iso-8859-15), so I installed Microsoft fonts:
# apt-get install msttcorefonts

After that the command to launch gnucash was:
# LANG=es_ES.ISO-8859-15@euro gnucash

I was trashing with /etc/gtk/gtkrc.iso-8859-15 to configure gtk-1 default fonts so it uses one which include iso-8859-15 charset (Arial). In gnucash Preferences I've choose Arial for ledger so it doesn't use helvetica which does not have € symbol.

For people using a more common charset generating locales and changing LANG environment variable should be enought.

Regarding converting the file I wasn't able when I tried it.

Changed in gnucash:
status: Unknown → Rejected
Revision history for this message
Jeffrey Ratcliffe (jeffreyratcliffe) wrote :

GnuCash 1.9.8 is quite stable and available from Debian Sid. This copes with UTF-8 with no problems. I've added instructions to the GnuCashHowTo in the Ubuntu wiki.

Revision history for this message
Adam Buchbinder (adam-buchbinder) wrote :

gnucash 2.0.0 is now available from edgy, and the source builds without modifications on dapper. (See bug 52486 for the request to add it to the backports repository.) Can you test this bug on the newer version? It has a wizard which provides for importing data from various locales in what should be a useful manner.

Revision history for this message
Davidaf (davidaf) wrote :

After rebuilding edgy sources in dapper, it seems to import my accounting file without problems respecting all my specific language characters (áéíóúÁÉÍÓÚüÜñÑ€).

I have only tested this new version a few minutes but as now, I think this bug can be closed once/if gnucash is backported.

Revision history for this message
William Grant (wgrant) wrote :

Fixed in 2.0, uploaded some 6 months ago.

Changed in gnucash:
status: Needs Info → Fix Released
Changed in gnucash:
importance: Unknown → High
status: Invalid → 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.