SamyGo add locale UTF-8 in bash??

Ideas and dreaming will go this forum

BorisAU
Posts: 18
Joined: Wed Jan 22, 2014 8:27 am

SamyGo add locale UTF-8 in bash??

Post by BorisAU » Wed Jun 01, 2016 4:46 pm

Symbols of the Russian language is not displayed properly and may not be processed in a bash script.
Can I add location UTF-8 ??

For example on the supplied Samsung emulator 2014 5.1 VirtualBox have the following locale

Code: Select all

root@smarttvemulator:~# echo $LANG
en_US.UTF-8
root@smarttvemulator:~# locale -a
C
C.UTF-8
en_AG
en_AG.utf8
en_AU.utf8
en_BW.utf8
en_CA.utf8
en_DK.utf8
en_GB.utf8
en_HK.utf8
en_IE.utf8
en_IN
en_IN.utf8
en_NG
en_NG.utf8
en_NZ.utf8
en_PH.utf8
en_SG.utf8
en_US.utf8
en_ZA.utf8
en_ZM
en_ZM.utf8
en_ZW.utf8
POSIX
And in it with characters displaying all right.
In SamyGo these teams do not give out.
F8000 root :)

sectroyer
Official SamyGO Developer
Posts: 5631
Joined: Wed May 04, 2011 5:10 pm

Re: SamyGo add locale UTF-8 in bash??

Post by sectroyer » Wed Jun 01, 2016 5:09 pm

Yeah TV doesn't support locales, to much to change :)
I do NOT support "latest fw" at ALL. If you have one you should block updates on router and wait for it to STOP being "latest":)
If you want me to help you please paste FULL log(s) to "spoiler"/"code" bbcodes or provide link(s) to pasted file(s) on http://ctrlv.it/ Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!

zoelechat
SamyGO Moderator
Posts: 7793
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

Re: SamyGo add locale UTF-8 in bash??

Post by zoelechat » Wed Jun 01, 2016 5:22 pm

BorisAU wrote:may not be processed in a bash script.
UTF-8 is fully supported in scripts :)
I do NOT receive any PM. Please use forum.

BorisAU
Posts: 18
Joined: Wed Jan 22, 2014 8:27 am

Re: SamyGo add locale UTF-8 in bash??

Post by BorisAU » Wed Jun 01, 2016 5:41 pm

zoelechat wrote:
BorisAU wrote:may not be processed in a bash script.
UTF-8 is fully supported in scripts :)
Unfortunately no

Trivial File sorting script eventually turns all the characters of the Russian alphabet in the underscore _

Code: Select all

#!/bin/bash

VIDEO="/dtv/usb/sda5/temp/video"
MUSIC="/dtv/usb/sda5/temp/music"

# ?????????, ?????????? ?? ????????. ???? ??? - ??????? ??
if [ ! -e $VIDEO ]
then
  mkdir -p $VIDEO
fi

if [ ! -e $MUSIC ]
then
  mkdir -p $MUSIC
fi

for file in *
do                      
  if [ -f "$file" ] # ???? ???? "??????????" (?? ?????????? ? ?? ????-??????????)  ??????
  then
    case "$file" in
      *.avi|*.flv|*.wmv|*.vob)
        mv "$file" $VIDEO
        ;;
      *.mp3)
        mv "$file" $MUSIC
        ;;
    esac
  fi
done
file in

Code: Select all

?????.avi
file out

Code: Select all

_____.avi

Code: Select all

VDLinux#> ls
new file.mp3     ???? ??????.mp3
F8000 root :)

sectroyer
Official SamyGO Developer
Posts: 5631
Joined: Wed May 04, 2011 5:10 pm

Re: SamyGo add locale UTF-8 in bash??

Post by sectroyer » Wed Jun 01, 2016 5:47 pm

yes, expected, no sorting. Supported:
- printing to screen
That's all :) Else "blocked" by TV :)
I do NOT support "latest fw" at ALL. If you have one you should block updates on router and wait for it to STOP being "latest":)
If you want me to help you please paste FULL log(s) to "spoiler"/"code" bbcodes or provide link(s) to pasted file(s) on http://ctrlv.it/ Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!

BorisAU
Posts: 18
Joined: Wed Jan 22, 2014 8:27 am

Re: SamyGo add locale UTF-8 in bash??

Post by BorisAU » Wed Jun 01, 2016 6:01 pm

The solution was simple to ugliness

it turned out that the file is created on the TV is stored only on the Mac encoding.
The solution was to create a UTF-8 sh file on Win, and then moved to TV folder in finished form ...

:)
F8000 root :)

zoelechat
SamyGO Moderator
Posts: 7793
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

Re: SamyGo add locale UTF-8 in bash??

Post by zoelechat » Wed Jun 01, 2016 6:09 pm

Exactly :)


...Apple patented some charset!? :p
I do NOT receive any PM. Please use forum.

sectroyer
Official SamyGO Developer
Posts: 5631
Joined: Wed May 04, 2011 5:10 pm

Re: SamyGo add locale UTF-8 in bash??

Post by sectroyer » Wed Jun 01, 2016 6:48 pm

lol :D Maybe we have different problems :D
I do NOT support "latest fw" at ALL. If you have one you should block updates on router and wait for it to STOP being "latest":)
If you want me to help you please paste FULL log(s) to "spoiler"/"code" bbcodes or provide link(s) to pasted file(s) on http://ctrlv.it/ Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!

zoelechat
SamyGO Moderator
Posts: 7793
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

Re: SamyGo add locale UTF-8 in bash??

Post by zoelechat » Thu Jun 02, 2016 12:52 pm

I focused on it and actually it's possible, but it implies custom libc and busybox, and absolutely no chance as long as you don't have true Telnet anyway (VDlinux shit is not). Not kind of stuff I'll make a tutorial... Here's at least proof :)

Code: Select all

/mnt # echo "?????????? ?? ????????"
?????????? ?? ????????
/mnt # locale
LANG=C.UTF-8
LC_CTYPE="C.UTF-8"
LC_NUMERIC="C.UTF-8"
LC_TIME="C.UTF-8"
LC_COLLATE="C.UTF-8"
LC_MONETARY="C.UTF-8"
LC_MESSAGES="C.UTF-8"
LC_PAPER="C.UTF-8"
LC_NAME="C.UTF-8"
LC_ADDRESS="C.UTF-8"
LC_TELEPHONE="C.UTF-8"
LC_MEASUREMENT="C.UTF-8"
LC_IDENTIFICATION="C.UTF-8"
LC_ALL=
/mnt # locale -a
C
C.UTF-8
POSIX
I do NOT receive any PM. Please use forum.

wluczykijwf
Official SamyGO Developer
Posts: 1028
Joined: Sat Sep 21, 2013 5:07 pm
Location: Poland

Re: SamyGo add locale UTF-8 in bash??

Post by wluczykijwf » Thu Jun 02, 2016 1:18 pm

zoelechat wrote:[...] I'll make a tutorial... [...]
Awesome and I wait for it :)
sorry for my english
UE40F8000 (T-FXPDEUC-1125.1), BD-D5500

Post Reply

Return to “[F] Brainstorm”