WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: UTF-8 System locales  (Read 4399 times)

Offline koutsenko

  • Newbie
  • *
  • Posts: 14
UTF-8 System locales
« 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. 

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: UTF-8 System locales
« Reply #1 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.
The only barriers that can stop you are the ones you create yourself.

Online patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 711
Re: UTF-8 System locales
« Reply #2 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
« Last Edit: February 08, 2017, 03:41:39 AM by patrikg »

Offline koutsenko

  • Newbie
  • *
  • Posts: 14
Re: UTF-8 System locales
« Reply #3 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.
« Last Edit: February 08, 2017, 06:07:42 AM by koutsenko »

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: UTF-8 System locales
« Reply #4 on: February 08, 2017, 06:31:25 AM »
Download a copy and keep it handy: Core book ;)

Offline koutsenko

  • Newbie
  • *
  • Posts: 14
Re: UTF-8 System locales
« Reply #5 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...