Announcement

Collapse
No announcement yet.

piCorePlayer --- switch $LANG to UTF8

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #31
    ...that's right: there seems to be no UTF8 support in the terminal (sh or bash), neither as output (?? instead of proper unicode character) or input (can't type Umlauts, €, etc.). Also, there is no german keyboardmap in /usr/share/kmap and the kmap extension doesn't seem to be available.

    Thinking of switching to piCoreplayer version < 6. Would that help?

    Regards
    Matti

    Comment


      #32
      kmaps.tcz is available on the piCore repo. You should be able to select that in the extension pages.

      I've had no problems with unicode characters, but not tested greatly. Are you using a local console, or an ssh client. Are you sure your ssh client is setup properly for unicode display.
      piCorePlayer a small player for the Raspberry Pi in RAM.
      Homepage: https://www.picoreplayer.org

      Please donate if you like the piCorePlayer

      Comment


        #33
        Good Morning,

        the connection is made via ssh. pCP's ssh config doesn't have either SendEnv or AcceptEnv set in /usr/local/etc/ssh/ssh_config. So, i'm quite sure it's not the ssh connection messing up the environment on pCP.

        For your information: kmap.tcz is not available in the main-, mirror- or official piCore(Player) repository, as far as i can see on the extensions page.

        I'm in the process of setting up a 5.0.0 standard version server, to see whether things are different there. Mind you, before i crashed my old server (can't remember whether that was version 3, 4 or 5 ;-) ) UTF8 support worked fine.

        Have a good day, stay healthy!
        Regards
        Matti

        Comment


          #34
          blank window from getlocale.sh

          Hello Matti, Hello Paul,

          I am new to squeezebox, just started a few weeks ago with running piCorePlayer on a RasPi 2B, and I am having the same or similar issue: German "Umlaute" symbols causing songs and albums not to show up in the library.
          Actually, it is slightly more confusing, because the albums only disappear in the additional libraries that I have added using the "Simple Library Views" plugin. They show up correctly in the regular "album" library.

          So, in trying to solve this issue, I attempted to install the German UTF-8 locale using the extension and getlocale.sh. But when I run the script with "sudo getlocale.sh" I get noothing but a black screen and the prompt shows up at the bottom of the terminal window again. Adding the line "export TERM=xterm" as suggested did not help. I am connecting via SSH using PuTTY and getlocale.tcz is in the onboot.lst.

          Any ideas from the experts what is happening here and how I could get things working?

          Sorry, I am not overly familiar with linux, so bear with me if I made a silly mistake somewhere.

          Cheers
          SlowMo

          Comment


            #35
            faulty getlocale.sh script

            I also did encounter the same problem in piCoreplayer 8.2.0. I solved this with a sollution I found on
            http://forum.tinycorelinux.net/index...html#msg167051 .

            In your home directory, create a file called getlocale.sh
            Code:
            vi getlocale.sh
            copy following text in it
            Code:
            #!/bin/sh
            
            . /etc/init.d/tc-functionsgetlocae.sh
            
            checkroot
            
            SFILE=/usr/local/share/getlocale/SUPPORTED
            # Override terminal, incase ncurses-terminfo is not loaded
            export TERM=xterm
            export tempfile=`mktemp`
            temp2=`mktemp`
            
            echo "#!/bin/sh" > $temp2
            echo "dialog --backtitle \"TinyCore\" \\" >> $temp2
            echo "   --title \"LOCALE\" \"\[email protected]\" \\" >> $temp2
            echo "--separate-output --checklist \"Choose which locales to support:\" 0 42 20 \\" >> $temp2
            for i in `cat $SFILE`; do
               echo "$i \" \" off \\" >> $temp2
            done
            
            echo "2> $tempfile" >> $temp2
            chmod 755 $temp2
            
            $temp2
            
            [ "$?" -ne 0 ] && exit 1
            
            rm $temp2
            clear
            echo -e "${BLUE}Press enter to start processing."
            read gagme
            
            # Data available. Process.
            
            clear
            
            echo -ne "${BLUE}Now processing... ${CYAN}"
            
            mkdir -p /usr/lib/locale
            
            ( for i in `cat $tempfile`; do
               dest=${i%%/*}
               charset=${i##*/}
               locale=${dest%%.*}
            
               nice -n19 localedef -i $locale -c -f $charset $dest
             done
             echo "$dest" > /tmp/examplelocale
            ) &
            
            rotdash $!
            
            rm $tempfile
            
            echo -ne "\n${BLUE}Locales installed. Creating extension... ${CYAN}"
            
            ( tempdir=`mktemp -d`
               cd $tempdir
               mkdir -p usr/lib/locale
               cp -a /usr/lib/locale/locale-archive usr/lib/locale
               cd ..
               chmod 755 $tempdir
            
               rm -f mylocale.tcz
               mksquashfs $tempdir mylocale.tcz > /dev/null 2>&1
            
               rm -rf $tempdir
            ) &
            
            rotdash $!
            TCEDIR=`cat /opt/.tce_dir 2>/dev/null`
            readlink /etc/sysconfig/tcedir >/dev/null && TCEDIR=`readlink /etc/sysconfig/tcedir`
            OPTIONAL=${TCEDIR}/optional
            
            cp /tmp/mylocale.tcz $OPTIONAL
            grep -q "^mylocale.tcz" ${TCEDIR}/onboot.lst 2>/dev/null || echo "mylocale.tcz" >> ${TCEDIR}/onboot.lst
            echo "glibc_gconv.tcz" > ${OPTIONAL}/mylocale.tcz.dep
            md5sum ${OPTIONAL}/mylocale.tcz > ${OPTIONAL}/mylocale.tcz.md5.txt
            
            echo -e "\n\n${GREEN}Done. The extension is at ${OPTIONAL}/mylocale.tcz and in onboot.lst"
            echo "Reboot with lang=xyz (for example lang=`cat /tmp/examplelocale`) to start using this."
            echo -e "\n\nPress enter to quit.${NORMAL}"
            read gagme
            
            rm -f /tmp/examplelocale
            make it executable
            Code:
            sudo chmod 755 getlocale.sh
            and run as root
            Code:
            sudo ./getlocale.sh
            All credits are for Paul_123 and his team.

            Herewith I like to thank the whole PCp team for the excelent work done! And yes I made a donation too.




            Originally posted by SlowMo View Post
            Hello Matti, Hello Paul,

            I am new to squeezebox, just started a few weeks ago with running piCorePlayer on a RasPi 2B, and I am having the same or similar issue: German "Umlaute" symbols causing songs and albums not to show up in the library.
            Actually, it is slightly more confusing, because the albums only disappear in the additional libraries that I have added using the "Simple Library Views" plugin. They show up correctly in the regular "album" library.

            So, in trying to solve this issue, I attempted to install the German UTF-8 locale using the extension and getlocale.sh. But when I run the script with "sudo getlocale.sh" I get noothing but a black screen and the prompt shows up at the bottom of the terminal window again. Adding the line "export TERM=xterm" as suggested did not help. I am connecting via SSH using PuTTY and getlocale.tcz is in the onboot.lst.

            Any ideas from the experts what is happening here and how I could get things working?

            Sorry, I am not overly familiar with linux, so bear with me if I made a silly mistake somewhere.

            Cheers
            SlowMo

            Comment


              #36
              Thanks for posting.

              Is line 3 ". /etc/init.d/tc-functionsgetlocae.sh" correct?

              Comment


                #37
                Originally posted by Greg Erskine View Post
                Thanks for posting.

                Is line 3 ". /etc/init.d/tc-functionsgetlocae.sh" correct?
                No errors on this line but showing ". /etc/init.d/tc-functions"

                Comment


                  #38
                  Thank you mcblack for posting this solution. Worked perfect for me - just had to exchange line 3 to point to "tc_functions".

                  Your original code gave me this Error:

                  ./getlocale.sh: .: line 3: can't open '/etc/init.d/tc-functionsgetlocae.sh': No such file or directory

                  Thanks again - now I can finally play all my albums with German Umlaut-characters :-)

                  Originally posted by mcblack View Post
                  No errors on this line but showing ". /etc/init.d/tc-functions"

                  Comment


                    #39
                    Thanks guys! I've been using pCP for years - but only today I looked at the results of a directory listing, as I tweaked sorting in LMS last night. And only today I figured out this wasn't configured on my server .

                    paul- Greg Erskine - are you going to update/fix the built-in setlocale.sh? This thread would be a good candidate for a docs.picoreplayer.org page.
                    Michael

                    "It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
                    (LMS: Settings/Information)

                    Comment


                      #40
                      Hi Michael,

                      What needs to be changed in setlocale.sh?

                      Also, what's an accented character? lol

                      Comment


                        #41
                        Originally posted by Greg Erskine View Post
                        What needs to be changed in setlocale.sh?
                        TBH: I don't know. Paul mentioned something about ncurses causing problems? I eventually used the script mcblack posted (https://forums.slimdevices.com/forum...27#post1553427).

                        Originally posted by Greg Erskine View Post
                        Also, what's an accented character? lol
                        Hehe... éèöàä etc. In some locale Handel < Haydn < Händel, in German the order is Handel < Händel < Haydn. Lack of locale support LMS wouldn't get that right for a German user.
                        Michael

                        "It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
                        (LMS: Settings/Information)

                        Comment

                        Working...
                        X