This is the old SliTaz forum - Please use the main forum.slitaz.org

Locales and Character Maps in /usr/share/i18n/...
  • DarjeelingDarjeeling November 2010
    I've been running SliTaz 3.0 from a customized live CD since months and I'm very happy with it. But as my PC is low on RAM I've been looking around, trying to slim down the installation a little more. In /usr/share/i18n there are almost 10mb of locales and character maps and I'm wondering ... do I really need all this? Wouldn't it be enough for me to keep only the locales I really need, e.g. de_DE, en_GB, en_US and fr_FR? I also have no idea which of the 227 character maps are really needed and which aren't. All I know is, I've got a French keyboard and I read & write English, German and a rather lousy French (still learning). Maybe one of you knows which of these files can be safely removed?
  • kultexkultex November 2010
    I think you can do this, but it is better to make a backup - I think you also can delete /usr/share/locale all languages you do not need for your programs - like here: /usr/share/locale/de/LC_MESSAGES are all the german translations for your programs
  • GawronGawron November 2010
    Hi Darjeeling
    If you only need en_GB, en_US, French and German locale, you don't need slitaz-i18n and glibc-locale. This languages are present on standard cd image and have separate locale packages. You can remove safely slitaz-i18n and glibc-locale with tazpkg.
  • DarjeelingDarjeeling November 2010
    Thanks for your replies, Kultex & Gawron. Your hint at glibc-locale put me on the right track. The SliTaz package manager says the glibc-locale installation takes up 22.2 Mb ...

    Standard SliTaz 3.0 before glibc-locale installation ...
    /usr/lib/gconv ............. 5 files / 123 Kb
    /usr/share/i18n/charmaps ... 1 file / 286 Kb
    /usr/share/i18n/locales .... 21 files / 602 Kb

    Standard SliTaz 3.0 after glibc-locale installation ...
    /usr/lib/gconv ............. 248 files / 6.7 Mb
    /usr/share/i18n/charmaps ... 227 files / 3.2 Mb
    /usr/share/i18n/locales .... 278 files / 6.2 Mb

    ... and who knows what else. Over the weekend I spent some time trying to figure out which of these files were actually needed. And it was then that I remembered why I had installed glibc-locale in the first place. Earlier this year we all had problems with AbiWord in SliTaz 3.0 ... one could edit a text and safe it e.g. as *.doc or *.odt but on re-opening the file AbiWord would only present a blank page. After [url=http://forum.slitaz.org/index.php/discussion/969/solved-slitaz-abiword-still-broken-will-not-display-content]much tinkering[/url] it was Ernia who came up with a solution to the problem ... glibc-locale! At the time I was happy to get AbiWord working and didn't care about the disproportional amount of space glibc-locale was taking up. But now, on closer inspection, I found that none of the additional files in /usr/share/i18n/ were necessary as they only serve for the localization of applications. But removing the 248 additional files (character maps) in /usr/lib/gconv/ had an immediate effect ... AbiWord was no longer working! In a long drawn out and tedious elimination process I then found that actually only one (!) out of the 248 additional files in /usr/lib/gconv/ was needed to get AbiWord working without having to install glibc-locale ... "CP1252.so".

    In order to test this I booted a standard SliTaz 3.0 live CD, installed and upgraded AbiWord and added "CP1252.so" to /usr/lib/gconv/. I then created, saved and re-opened a number of multilingual (en,fr,ge) text files in AbiWord ...

    abw .... AbiWord
    awt .... AbiWord Template
    doc .... Microsoft Word
    rtf .... Rich Text Format
    docx ... Office Open XML
    odt .... OpenDocument
    sxw .... OpenOffice Writer

    ... they all worked without a problem. After installing aspell and the en/fr/ge aspell dictionaries I could switch between the dictionaries and run the AbiWord spell-checker on all of my 7 sample texts, again without a problem.

    As it looks, for the use of AbiWord the 22.2 Mb glibc-locale installation can be replaced by a single 9.6 Kb file without any ill-effects. The current cooking version of AbiWord lists glibc-locale as a dependency. Maybe, if someone can confirm what I have found out, glibc-locale can be altogether removed from the AbiWord dependency list and "CP1252.so" can somehow be bundled directly in the AbiWord package?

  • DarjeelingDarjeeling November 2010
    ... oops. How do I do links in this forum?
  • TotoetsasoeurTotoetsasoeur November 2010
    Well done Darjeeling. This is great. :-)

    Thanks for sharing.
    Stephane
  • DarjeelingDarjeeling November 2010
    I'm glad you like it, Totoetsasoeur. But I think I've created a bit of a muddle with the use of the word "additional" in the text above. After booting the original SliTaz 3.0 CD the folder /usr/lib/gconv/ contains these 5 files ...

    ANSI_X3.110.so 21.9 KB 2010-03-07 01:01
    gconv-modules 56.0 KB 2009-09-20 01:40
    ISO8859-1.so 9.6 KB 2010-03-07 01:01
    UNICODE.so 9.6 KB 2010-03-07 01:01
    UTF-16.so 9.6 KB 2010-03-07 01:01

    ... to which the installation of glibc-locale adds another 243 files (248 all in all). In order to get AbiWord to work without installing glibc-locale I'd keep the original 5 files plus ...

    CP1252.so 9.6 KB 2010-02-03 01:06

    ... from the glibc-locale installation. I have tested AbiWord with the above mentioned 7 file formats, each with English, French and German sample texts ... and it worked. But I have no idea if the same is true for Icelandic, Greek, Russian or Asian text documents.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

SliTaz Social