Tiny Core Linux

Tiny Core Base => Raspberry Pi => Topic started by: koutsenko on February 07, 2017, 07:44:00 PM

Title: UTF-8 System locales
Post by: koutsenko on February 07, 2017, 07:44:00 PM
Hello, I'm using RPi3 and PiCore 7.1b4.
$ locale -a

Says that only C and POSIX languages are avaiable.
Is there any way go get localized apps and web sites (such as Google Docs in Midori)?
They just don't display localized symbols, only a black border instead them. 
Title: Re: UTF-8 System locales
Post by: curaga on February 08, 2017, 03:19:49 AM
On normal Core, you'd use getlocale.tcz to install locales, not sure if it's available on Pi.

But web browsers are not related to locales anyway, they use their own methods. Usually you only need to install some TTF fonts for them to display non-English languages.
Title: Re: UTF-8 System locales
Post by: patrikg on February 08, 2017, 03:39:17 AM
In my case in Sweden.
Maybe also supply the charset, UTF-8 like sv_SE.UTF-8

Or just start them via
Code: (bash) [Select]
LANG=sv_SE firefox
Or first export/set the environment variable LANG and then start the app/program.
Code: (bash) [Select]
export LANG=sv_SE
firefox/chrome
Title: Re: UTF-8 System locales
Post by: koutsenko on February 08, 2017, 06:02:54 AM
> On normal Core, you'd use getlocale.tcz to install locales, not sure if it's available on Pi.
Yes, it isn't available in PiCore even for 7.1b4 version.

I tried to install dejavu-fonts-ttf.tcz before Midori installation.
But seems it don't work even after additional steps listed below was performed.
Maybe some additional setup is needed.

The one thing that helped me to display proper fonts was:
Step 1: set appropriate LANG. The console warning will be shown that app goes fallback to C locale, but anyway it's necessary step! Seriosly.
$ LANG=ru_RU midori
Step 2: change webpage default encoding in Midori. Menu->Preferences->Fonts->Preferred Encoding->Unicode (UTF-8).

Is there any way to automate that actions?
Just not to do them again each boot.

Thanks a lot for responses.
Title: Re: UTF-8 System locales
Post by: Misalf on February 08, 2017, 06:31:25 AM
Try the  lang=  boot code.
http://tinycorelinux.net/faq.html#bootcodes
Title: Re: UTF-8 System locales
Post by: koutsenko on February 08, 2017, 09:08:42 AM
I even added unicode locales as you suggested in tc translations topic, but can't change boot args, because Fn keys dont work while piCore boots...
Due to differences of tinycore and picore boot processes...