You are not logged in.

#1 2018-04-22 11:53:43

bheadmaster
Member
Registered: 2017-10-27
Posts: 43

[SOLVED] Gummi turns Unicode characters into garbage on saving

Opening a .tex file containing Unicode characters (š and č in particular) with Gummi turns them into garbage (č and Å¡, respectively). Every time I reopen the file I have to substitute the characters. When saved, the characters are saved properly (`cat sample.tex` shows the Unicode characters properly inside a terminal), but opening the document in Gummi seems to create the mess. The 'typesetter command' is set to 'TeXLive with XeTeX', and exporting the document preserves the characters properly.

When opening the document with Gummi from the terminal I get the following output:

[latex]$ gummi sample.tex
[Info] Gummi version: 0.7.4
[Info] configuration file: /home/lark/.config/gummi/gummi.cfg
[Info] Texlive 2017 was found installed..
[Info] Typesetter detected: pdfTeX 3.14159265-2.6-1.40.18 (TeX Live 2017/Arch Linux)
[Info] Typesetter detected: XeTeX 3.14159265-2.6-0.99998 (TeX Live 2017/Arch Linux)
[Info] Typesetter detected: Latexmk 4.55
[Info] snippets : /home/lark/.config/gummi/snippets.cfg
[Info] using libpoppler 0.63.0
(gummi:22963): GLib-CRITICAL **: 13:53:25.100: g_file_test: assertion 'filename != NULL' failed
(gummi:22963): Gtk-WARNING **: 13:53:25.168: Theme parsing error: <data>:1:10: not a number
(gummi:22963): Gtk-WARNING **: 13:53:25.168: Theme parsing error: <data>:1:21: Using Pango syntax for the font: style property is deprecated; please use CSS syntax
[Info] Typesetter xelatex configured.
[Info] setting styles scheme to solarized-dark
[Info] Style "def:error" defines a foreground, but no background color. As the fourground color has not enough contrast to Gummis default background color, the foreground color has been adjusted.
(gummi:22963): Gtk-WARNING **: 13:53:25.360: Theme parsing error: <data>:1:10: not a number
(gummi:22963): Gtk-WARNING **: 13:53:25.360: Theme parsing error: <data>:1:22: Using Pango syntax for the font: style property is deprecated; please use CSS syntax
[Info]
[Info] Environment created for:
[Info] TEX: /home/lark/Projects/latex/sample.tex
[Info] TMP: /home/lark/Projects/latex/.sample.tex.swp
[Info] PDF: /tmp/gummi/.sample.tex.pdf
(gummi:22963): Gtk-WARNING **: 13:53:25.362: Theme parsing error: <data>:2:28: The style property GtkButton:default-border is deprecated and shouldn't be used anymore. It will be removed in a future version
(gummi:22963): Gtk-WARNING **: 13:53:25.362: Theme parsing error: <data>:3:36: The style property GtkButton:default-outside-border is deprecated and shouldn't be used anymore. It will be removed in a future version
(gummi:22963): Gtk-WARNING **: 13:53:25.362: Theme parsing error: <data>:4:25: The style property GtkButton:inner-border is deprecated and shouldn't be used anymore. It will be removed in a future version
(gummi:22963): Gtk-WARNING **: 13:53:25.362: Theme parsing error: <data>:5:30: The style property GtkWidget:focus-line-width is deprecated and shouldn't be used anymore. It will be removed in a future version
(gummi:22963): Gtk-WARNING **: 13:53:25.362: Theme parsing error: <data>:6:27: The style property GtkWidget:focus-padding is deprecated and shouldn't be used anymore. It will be removed in a future version
[Info] loading sample.tex ...
[Error] Failed to convert text from default locale, trying ISO-8859-1

Does anyone know why is this happening or how to prevent this?

EDIT:
Setting `LANG=en_US.UTF-8` before running Gummi from the terminal fixes this problem. Is this a Gummi issue or an issue with my system? Currently my locale is set on `C`.

Last edited by bheadmaster (2018-04-22 12:48:00)


.............|
............/  GNU
........../
__---'''             o  LINUX

Offline

#2 2018-04-22 12:47:43

bheadmaster
Member
Registered: 2017-10-27
Posts: 43

Re: [SOLVED] Gummi turns Unicode characters into garbage on saving

Adding

LANG=en_US.UTF-8

to /etc/locale.conf solved the problem.


.............|
............/  GNU
........../
__---'''             o  LINUX

Offline

Board footer

Powered by FluxBB