Here is my "until we have the gnome2 port" solution to the UTF-8 problems.

The attached file is a drop-in replacement for the bin/gnucash script. To test, simply copy the script I attached to your "--prefix"/bin/ directory and run it. This solves all my UTF-8 problems... how 'bout yours?

Should work with OSes that use LANG or LANGUAGE to set the language. If your OS uses some other mechanism, at least you aren't any worse off. Let me know how other OSes deal with langauge settings and I'll make the appropriate adjustments.

Here is the actual bash code snippet I wrote (not the actual script), if bash masters out there want to comment:

# SHOWTEXT
if [ $LANG ] && [ `echo $LANG | grep ".UTF-8"` ];
then
   NEWLANG=`echo $LANG | sed -e "s/.UTF-8$//"`;
   if [ -n $SHOWTEXT ];
   then
      echo "Your LANG env var is set to $LANG.";
      echo "GnuCash does not support UTF-8 encoding well.";
      echo "Changing your LANG var to $NEWLANG";
   fi
   LANG=$NEWLANG;
   export LANG;
elif [ $LANGUAGE ] && [ `echo $LANGUAGE | grep ".UTF-8"` ];
then
   NEWLANG=`echo $LANGUAGE | sed -e "s/.UTF-8$//"`;
   if [ $SHOWTEXT == 1 ];
   then
      echo "Your LANGUAGE env var is set to $LANGUAGE.";
      echo "GnuCash does not support UTF-8 encoding well.";
      echo "Changing your LANGUAGE var to $NEWLANG";
   fi
   LANGUAGE=$NEWLANG;
   export LANGUAGE;
fi


-- -**-*-*---*-*---*-*---*-----*-*-----*---*-*---*-----*-----*-*-----*--- Jon Lapham <[EMAIL PROTECTED]> Rio de Janeiro, Brasil Work: Extracta Moléculas Naturais SA http://www.extracta.com.br/ Web: http://www.jandr.org/ ***-*--*----*-------*------------*--------------------*---------------


Attachment: gnucash.gz
Description: GNU Zip compressed data

_______________________________________________
gnucash-devel mailing list
[EMAIL PROTECTED]
http://www.gnucash.org/cgi-bin/mailman/listinfo/gnucash-devel

Reply via email to