LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

View Poll Results: Have you set up your Slackware to use UTF-8?
Yes 88 77.19%
No 26 22.81%
Voters: 114. You may not vote on this poll

Reply
 
Search this Thread
Old 12-08-2012, 09:43 AM   #1
NonNonBa
Member
 
Registered: Aug 2010
Distribution: Slackware
Posts: 61

Rep: Reputation: 21
Have you set up your Slackware to use UTF-8?


Hello,

Nowadays, most of the widely used Linux distros use UTF-8 as their default charset. Slackware seems to be the last one providing a byte-oriented charset environment base.

Of course, it is not for the fun or by dogmatism Slackware does that. Some applications don't handle UTF-8 (e.g. elvis, the default "vi" command), and others become less efficient using it (e.g. for a long time grep was known to be drastically slowed with the UTF-8 locales).

Nevertheless, many of the Slackers (including me) have chosen to adopt UTF-8 for their charset. The purpose of this thread is to figure the part of the Slackware users they might represent, and to collect information about their motivations and the problems (fixed or not) they may have encountered doing it. Ideally, the result might be used as a kind of bugtracker to someday get a full UTF-8 default Slackware.
 
Old 12-08-2012, 09:46 AM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,592
Blog Entries: 2

Rep: Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047
Running with UTF-8 to prevent some glitches with displaying German umlauts.
 
Old 12-08-2012, 09:49 AM   #3
WiseDraco
Member
 
Registered: Nov 2006
Location: Europe,Latvia,Riga
Distribution: slackware,slax, exMandriva
Posts: 382

Rep: Reputation: 30
i live with russian and latvian languages ( cyrillic and some non-standart latin characters), as so sometimes i encounter a filenames in russian and so on, as so UTF8 is important for me.
 
Old 12-08-2012, 09:58 AM   #4
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
No, I don't need UTF-8 ATM. If the need comes up, I'll just change it.
 
Old 12-08-2012, 10:37 AM   #5
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,569
Blog Entries: 1

Rep: Reputation: 1026Reputation: 1026Reputation: 1026Reputation: 1026Reputation: 1026Reputation: 1026Reputation: 1026Reputation: 1026
Yes, I use UTF-8.
 
Old 12-08-2012, 11:38 AM   #6
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-{14.1,current} on a Lenovo Thinkpad T61 6457-4XG
Posts: 4,388

Rep: Reputation: 1090Reputation: 1090Reputation: 1090Reputation: 1090Reputation: 1090Reputation: 1090Reputation: 1090Reputation: 1090
I do, without a hitch.

As suggested by the OP, it would be interesting to hear from people encountering problems in doing so, in order to list obstacles in the path of generalizing UTF-8 and find ways to overcome it.

@NonNonBa: merci d'avoir tenu ta promesse

Last edited by Didier Spaier; 12-08-2012 at 11:39 AM.
 
Old 12-08-2012, 01:50 PM   #7
bobzilla
Member
 
Registered: Nov 2005
Location: Serbia
Distribution: Slackware
Posts: 176

Rep: Reputation: Disabled
Quote:
Originally Posted by Didier Spaier View Post
As suggested by the OP, it would be interesting to hear from people encountering problems in doing so, in order to list obstacles in the path of generalizing UTF-8 and find ways to overcome it.
It would be nice to have a list of common problems (and solutions if possible). If those were known, they could be added to "Localization" article in the SDP.
 
Old 12-08-2012, 02:18 PM   #8
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,971

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
I've UTF-8 because of the German Umlaute , , , , , ,

Markus
 
Old 12-08-2012, 04:15 PM   #9
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware, Mint
Posts: 1,240

Rep: Reputation: 196Reputation: 196
I live in Poland. The traditional encoding for Polish language is ISO-8859-2. The people in French or Russia use the other encodings. I don’t know how the people in Poland, French, or Russia deal with the different encodings because I tend to solve the problems my way. So I can merely describe the methods which I used in the past or which I use now. The following description is simplified – in real life I used and I use some additional more or less sophisticated solutions.

Up to Slackware 9.1 I used ISO-8859-2 encoding. In those times to input characters using ISO-8859-2 encoding I used the script xplkbset.iso-8859-2:

Code:
#!/bin/sh

# installs Polish keyboard for X Window (ISO-8859-2)

PLKBOK=`xmodmap -pm | awk '/Mode_switch/ { print $1; exit }'`
if [ -z "$PLKBOK" ]
then
    for MODALT in Alt Meta Super Hyper Shift
    do
        SYMALTR=`xmodmap -pk | awk "/${MODALT}_R/ { print \$1; exit }"`
        if [ -n "$SYMALTR" ]
        then
            SYMALTL=`xmodmap -pk | awk "/${MODALT}_L/ { print \$1; exit }"`
            if [ -n "$SYMALTL" ]
            then
                MODALTR=`xmodmap -pm | awk "/${MODALT}_R/ { print \$1; exit }"`
                xmodmap -e "remove $MODALTR = ${MODALT}_R"
                xmodmap -e "keycode $SYMALTR =  Mode_switch"
                MODSWT=`xmodmap -pm | awk '/^mod/ { if ( $2=="" ) { print $1; exit } }'`
                xmodmap -e "add $MODSWT = Mode_switch"
            break
            fi
        fi
    done
fi
PLKBOK=`xmodmap -pm | awk '/Mode_switch/ { print $1; exit }'`
if [ -n "$PLKBOK" ]
then
    xmodmap -e "keysym A = a A plusminus exclamdown"
    xmodmap -e "keysym C = c C ae AE"
    xmodmap -e "keysym E = e E ecircumflex Ecircumflex"
    xmodmap -e "keysym L = l L threesuperior sterling"
    xmodmap -e "keysym N = n N ntilde Ntilde"
    xmodmap -e "keysym O = o O oacute Oacute"
    xmodmap -e "keysym S = s S paragraph brokenbar"
    xmodmap -e "keysym X = x X onequarter notsign"
    xmodmap -e "keysym Z = z Z questiondown macron"
fi
(I had also the analogous scripts for UTF-8 and CP1250 – the Microsoft Windows encoding for Polish language.)

When Slackware 10.0 appeared it turned out that my scripts stopped to work and xterm requires ISO-8859-2 encoding to input the characters while OpenOffice.org requires UTF-8 encoding. Since Slackware 10.0 the default Polish keyboard for X Window uses UTF-8 encoding and is stored in /etc/X11/xkb/symbols/pl file. In order to be able to input Polish characters using ISO-8859-2 encoding in xterm I prepared my own keyboard driver named pl0:

Code:
// based on a keyboard map from an 'xkb/symbols/pl' file
//
// $XFree86: xc/programs/xkbcomp/symbols/pc/pl,v 1.3 2003/04/19 12:22:12 pascal Exp $

partial default alphanumeric_keys
xkb_symbols "pl" {

    include "latin"

    name[Group1]="Polish";

    key <AD03>  { [         e,          E,  ecircumflex,  Ecircumflex ] };
    key <AD09>  { [         o,          O,       oacute,       Oacute ] };

    key <AC01>  { [         a,          A,    plusminus,   exclamdown ] };
    key <AC02>  { [         s,          S,    paragraph,    brokenbar ] };
    key <AC09>  { [         l,          L,threesuperior,     sterling ] };

    key <AB01>  { [         z,          Z, questiondown,       macron ] };
    key <AB02>  { [         x,          X,   onequarter,      notsign ] };
    key <AB03>  { [         c,          C,           ae,           AE ] };
    key <AB06>  { [         n,          N,       ntilde,       Ntilde ] };

    include "level3(ralt_switch)"
};
To switch between ISO-8859-2 and UTF-8 back and forth I used the commands: setxkbmap pl0 and setxkbmap pl.

When Slackware 13.37 appeared I decided to switch to UTF-8 completely. From time to time I need the terminal using ISO-8859-2 encoding. In such a situations I run the script xterm-ISO-8859-2:

Code:
#!/bin/sh

export GROFF_ENCODING=iso-8859-1 LESSCHARSET=latin1 LANG=en_US XTERM_LOCALE=en_US
/usr/bin/X11/xterm +sb -fg black -bg yellow -geometry 99x49+64+0 -fn -misc-fixed-medium-r-normal--15-140-75-75-c-90-iso8859-2
(The above script is customized to work in Window Maker using 1024768 resolution.)

I never localized the system nor the programs except the testing purposes so I use the settings specific for an American-English:

Code:
GROFF_ENCODING=UTF-8
LANG=en_US.UTF-8
LESSCHARSET=UTF-8
XTERM_LOCALE=en_US.UTF-8
I described above the solutions which I used or I use in X Window (since 1998 I run Window Maker exclusively). The other solutions were and are required in the console mode: up to Slackware 13.1 I used ISO-8859-2 and since Slackware 13.37 I use UTF-8. The same with HTML files: up to Slackware 13.1 I used ISO-8859-2 and since Slackware 13.37 I use UTF-8.

The other problem concerned different encodings. Before ISO-8859-2 (Linux) and CP1250 (Microsoft Windows) were invented and popularized we have in Poland about twenty different encodings (most notable were Mazovia and IBM Latin-2). Before UTF-8 was invented Polish TeX and LaTeX users used seven different encodings (most of these encodings simply used different prefixes such as: /, ", @, and ~ though there were also slightly more complicated encodings such as popular “ogonek”). So in those old times I wrote a few converters from and to all those encodings. Now we have in Poland three encodings in use: UTF-8, ISO-8859-2, and CP1250. To convert between them it’s enough to use piconv program.

Before the right designed fonts offering Polish diacritic characters appeared different ugly methods were used to substitute eighteen Polish diacritics: Ą, Ć, Ę, Ł, Ń, , Ś, Ź, Ż, ą, ć, ę, ł, ń, , ś, ź, and ż. But it isn’t the history but a prehistory of computing in Poland.

Last edited by w1k0; 12-08-2012 at 11:55 PM. Reason: typo
 
6 members found this post helpful.
Old 12-08-2012, 04:50 PM   #10
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-{14.1,current} on a Lenovo Thinkpad T61 6457-4XG
Posts: 4,388

Rep: Reputation: 1090Reputation: 1090Reputation: 1090Reputation: 1090Reputation: 1090Reputation: 1090Reputation: 1090Reputation: 1090
w1k0: very instructive, thanks!

In addition, could you tell us which fonts you use with all the needed glyphs for Polish, including the diacritics and ligatures if any are needed?
 
Old 12-08-2012, 05:21 PM   #11
Paulo2
Member
 
Registered: Aug 2012
Distribution: Slackware current(32) (started with 13.37(32))
Posts: 144

Rep: Reputation: 29
I'm from Brazil, and our language is portuguese (pt-br).
It has some differences to portuguese from Portugal (pt-pt),
but both has the same accented characters and etc.

For me, changing to utf-8 solved the problem in graphical
interface, but not on the console.
All fonts that come with Slackware doesn't show
correctly on the console.
I downloaded the font terminus-font-4.38.tar.gz and it's
slackbuild, and problem solved

I'm not a power user of shell (just a regular user) so for me there is no
problem using utf-8 in graphical or command line environment.
 
Old 12-08-2012, 05:39 PM   #12
Quercus ruber
Member
 
Registered: Mar 2004
Location: Bocholt, Germany
Distribution: Slackware
Posts: 117

Rep: Reputation: 17
Yes I use it because of the German umlauts. I haven't had any problems yet, so I guess I'm not really the type of person you want to hear from.
 
Old 12-08-2012, 05:44 PM   #13
astrogeek
Senior Member
 
Registered: Oct 2008
Distribution: Slackware: 12.1, 13.1, 14.1, 64-14.1, -current, FreeBSD-10
Posts: 1,954

Rep: Reputation: 733Reputation: 733Reputation: 733Reputation: 733Reputation: 733Reputation: 733Reputation: 733
I spend most of my time in a terminal doing development with heavy database use.

Usually Unicode characters showing up in data from outside was the only minor annoyance, and using Vim on files from others which contained Unicode characters.

Early this year I switched from Konsole to Tmux with urxvt and changed everything to UTF-8 at that time.

There have been no big changes for me, but now I see "odd" characters in data and Vim correctly and that was probably worth the trouble (but it was no trouble at all!).
 
Old 12-08-2012, 07:16 PM   #14
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware, Mint
Posts: 1,240

Rep: Reputation: 196Reputation: 196
I cant remember what fonts I used before Slackware 8.0.

According to my article about Slackware 8.0 the Polish fonts for X Window provided with that distribution were incomplete so I advised the users to remove the standard fonts with removepkg xfntslt2 command and to install the set of the fonts which I put into website. Unfortunately I dont have that package so I cant be more specific in that case. With Slackware 8.0 I used Polish keyboard defined in .Xmodmap.

The most sophisticated methods I tested in 2002 with OpenOffice.org 1.0.1. I installed then the Type1 fonts from ulT1mo collection used by X Window type1 module and the TrueType fonts from Microsoft FontPack used by X Window freetype module. Each font type caused the other problems with OpenOffice.org. The program displayed Type1 fonts properly but ignored in their case spell checking and it used proper spell checking in the case of TrueType fonts but the standard Slackware keyboard driver produced invalid Polish diacritics. To get the valid characters with TrueType fonts I prepared keyboard driver using UTF-8 encoding. As for Type1 fonts and spell checking it wasnt possible to enable it because these fonts used non-standard adobe-fontspecific encoding.

For a long time I refused to use Microsoft FontPack on a regular basis and I used the mentioned Type1 fonts. Then for some time I switched to Microsoft FontPack (these fonts were in those times the most popular among Linux users in Poland).

A few years ago I switched to GNU FreeFont (see: http://www.gnu.org/software/freefont/). These fonts are designed very well and offer a lot of special characters. I prefer them than angular Liberation fonts and I prefer them than the fonts from Microsoft FontPack which offer poorly designed Polish diacritic characters (especially Ą, Ę, ą, and ę). GNU FreeFont looks also better on the screen than Liberation or Microsoft fonts.

A year ago I bought Brother HL-5340D laser printer. As it turned out that printer causes serious problems during printing the texts prepared with GNU FreeFont many diacritic characters from different languages including Polish are printed bad. I inspected these fonts, established the reasons of the problems, and repaired a lot of characters. I reported that in a rather long thread (see: http://savannah.gnu.org/bugs/?32220). To read about the partial solution see the first post comment #15 from that thread (Sun 23 Jan 2011). My bug report is still open so I suppose these fonts arent repaired yet.

***

As I see theres a new GNU FreeFont release 20120503 (see: http://ftp.gnu.org/gnu/freefont/ and http://slackbuilds.org/repository/14.0/system/freefont/). Ill test them with my Brother laser printer and Ill report the results here.

Last edited by w1k0; 12-09-2012 at 12:05 PM.
 
Old 12-08-2012, 07:36 PM   #15
Grischuna
Member
 
Registered: Mar 2009
Distribution: Slackware64 14.0 multilib
Posts: 44

Rep: Reputation: 0
As already many mentioned, I use as well UTF-8 because of the the German and French special characters.

Cheers
 
  


Reply

Tags
unicode


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Umlauts (,,) does not shown right even if UTF-8 is set on Red Hat 6.3 Santiago mindgame71 Linux - Server 0 10-04-2012 01:57 AM
How to set Charset to UTF-8 in Apache for scripts? cooljai Linux - Software 0 05-15-2008 04:53 AM
The parameter --locale=xx_YY.utf-8 was not set in your /etc/default/dictd tony safari Linux - Software 0 03-18-2007 09:13 AM
Conversion from character set 'UTF-8' to @local error Postgre Slackware 2 09-11-2006 09:15 PM
Help needed with font installation on Debian 3.1 with locale all set to en_US.UTF-8 PhantmShado Linux - Software 1 02-20-2006 03:50 PM


All times are GMT -5. The time now is 10:38 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration