Bug 26579 - xfig symbol font does not work in unicode locale
Summary: xfig symbol font does not work in unicode locale
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: xfig (show other bugs)
Version: unstable
Hardware: all Linux
: P3 normal
Assignee: Vladislav Zavjalov
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-14 14:53 MSK by viy
Modified: 2011-11-16 23:00 MSK (History)
1 user (show)

See Also:


Attachments
An example hello_xfig.fig file with greek letters (165 bytes, image/x-xfig)
2011-11-14 14:53 MSK, viy
no flags Details
PostScript export of hello_xfig.fig file with greek letters (2.99 KB, image/x-eps)
2011-11-14 14:55 MSK, viy
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description viy 2011-11-14 14:53:42 MSK
Created attachment 5203 [details]
An example hello_xfig.fig file with greek letters

xfig does not input greek letters from "symbol font" or display "symbol font" in unicode locale like ru_RU.UTF-8.
An example hello_xfig.fig file with greek letters is attached.

hello_xfig.fig opens and processes to ps w/o any problem in C and en_US locale, but fails to be processed correctly in ru_RU.UTF-8.

Since ru_RU.UTF-8 is default locale, xfig should be run explicitly in en_US locale in xfig.desktop file disregard of user's locale.

Localization does not matter, as xfig does not have one.
Comment 1 viy 2011-11-14 14:55:00 MSK
Created attachment 5204 [details]
PostScript export of hello_xfig.fig file with greek letters
Comment 2 Vladislav Zavjalov 2011-11-14 17:21:10 MSK
The problem with Greek symbols in UTF8 locale can easily be solved.
I am building 3.2.5b-alt4 with the fix now.

But there is still a great problem with UTF8 (and other multibyte) locales. Xfig itself works well with it, but transfig can't put multibyte symbols into Postscript (afaik there is some difficulties with multibyte charsets in Postscript). You can work with russian letters in xfig in the UTF8 locale, but you can't correctly export these letters in ps, png and so on...
Comment 3 Repository Robot 2011-11-14 17:38:08 MSK
xfig-3.2.5b-alt4 -> sisyphus:

* Mon Nov 14 2011 Vladislav Zavjalov <slazav@altlinux> 3.2.5b-alt4
- don't use fontsets for symbols and dingbats fonts (closes #26579)
Comment 4 viy 2011-11-14 17:44:42 MSK
thank you!
please, backport it to p6 or t6 as well.

Also, better safe than sorry, I'd recommend to put xfig in a wrapper to avoid
using utf-8 locales.
like
--------------xfig.sh------
#!/bin/sh
case $LANG in
    *ru_RU.UTF-8) LANG=ru_RU.KOI8-R;;
    *uk_UA.UTF-8) LANG=uk_UA.KOI8-U;;
esac
export LANG;
xfig "$@"
Comment 5 viy 2011-11-14 17:54:20 MSK
(added us, fixed misprint)
#!/bin/sh
case $LANG in
    en_US.UTF-8) LANG=en_US.8859-1;;
    ru_RU.UTF-8) LANG=ru_RU.KOI8-R;;
    uk_UA.UTF-8) LANG=uk_UA.KOI8-U;;
esac
export LANG;
xfig "$@"
Comment 6 Vladislav Zavjalov 2011-11-14 18:26:48 MSK
OK, I'll do it.
Comment 7 viy 2011-11-16 23:00:26 MSK
thanks!