XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    xoa, xoa-updater ignore LC variables

    Scheduled Pinned Locked Moved Xen Orchestra
    utf8xoa-updaterxoa
    9 Posts 3 Posters 1.1k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • MajorTomM Offline
      MajorTom
      last edited by MajorTom

      Hello.
      Seems that xoa and xoa-updater commands ignore LC variables.

      With (probably a default one) UTF8 set I got unreadable (UTF8?) characters. This is already expected ;-(

      xoa:~$ export LC=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 LC_ALL=en_US.UTF-8
      xoa:~$
      xoa:~$ xoa check
      â Node version
      â xo-server config syntax
      â Disk space for /var
      â Disk space for /
      â XOA version
      â Native SMB support
      â Appliance registration
      â npm version
      â Internet connectivity
      xoa:~$
      xoa:~$ xoa-updater
      stable channel selected.
      
      â
       š All up to date
      

      Similar unreadable stuff with systemctl, not a surprise:

      xoa:~$ systemctl status xoa-updater.service
      â xoa-updater.service - XOA Updater
         Loaded: loaded (/etc/systemd/system/xoa-updater.service; enabled; vendor pres
         Active: active (running) since Fri 2019-05-31 03:24:14 CEST; 14h ago
       Main PID: 489 (node)
          Tasks: 10 (limit: 19660)
         CGroup: /system.slice/xoa-updater.service
                 ââ489 node /usr/local/bin/xoa-updater-start
      

      Now I set clean classical variables:

      xoa:~$ export LC=C LC_CTYPE=C LC_ALL=C

      Systemctl behaves properly, that is it uses * not â and `- not ââ:

      xoa:~$ systemctl status xoa-updater.service
      * xoa-updater.service - XOA Updater
         Loaded: loaded (/etc/systemd/system/xoa-updater.service; enabled; vendor pres
         Active: active (running) since Fri 2019-05-31 03:24:14 CEST; 14h ago
       Main PID: 489 (node)
          Tasks: 10 (limit: 19660)
         CGroup: /system.slice/xoa-updater.service
                 `-489 node /usr/local/bin/xoa-updater-start
      

      But xoa and xoa-updater - not!

      xoa:~$ xoa check
      â Node version
      â xo-server config syntax
      â Disk space for /var
      â Disk space for /
      â XOA version
      â Appliance registration
      â Native SMB support
      â npm version
      â Internet connectivity
      xoa:~$
      xoa:~$ xoa-updater
      stable channel selected.
      
      â
       š All up to date
      

      That is, still unreadable stuff.

      XOA is stable channel, up-to-date.

      Could it be corrected? Thanks!

      1 Reply Last reply Reply Quote 0
      • olivierlambertO Online
        olivierlambert Vates 🪐 Co-Founder CEO
        last edited by

        Pinging julien-f

        1 Reply Last reply Reply Quote 0
        • julien-fJ Offline
          julien-f Vates 🪐 Co-Founder XO Team
          last edited by

          Indeed, this is not supported.

          Why do need this?
          It should work correctly in an XOA.

          MajorTomM 1 Reply Last reply Reply Quote 0
          • MajorTomM Offline
            MajorTom @julien-f
            last edited by MajorTom

            julien-f said in xoa, xoa-updater ignore LC variables:

            Indeed, this is not supported.

            Why do need this?

            To have readable characters 🙂

            1 Reply Last reply Reply Quote 0
            • julien-fJ Offline
              julien-f Vates 🪐 Co-Founder XO Team
              last edited by

              You should have readable characters by default…

              1. What OS and terminal emulator are you using?
              2. What is your local locale?
              MajorTomM 1 Reply Last reply Reply Quote 0
              • MajorTomM Offline
                MajorTom @julien-f
                last edited by

                julien-f I have a few "hops" (systems that I must log into) on the way to the destination.

                AFAIK, software should obey LC to enable proper displaying in similar situations, among others 🙂

                1 Reply Last reply Reply Quote 0
                • julien-fJ Offline
                  julien-f Vates 🪐 Co-Founder XO Team
                  last edited by

                  I think it's pretty standard in C (and well supported), but I've never seen any Node CLIs handling this.

                  Of course, with some effort, we could fix this but, as it it's a very minor issue and you're the only one to have reported, it's very low priority for us.

                  If/when this library support this, we'll be happy to fix it.

                  MajorTomM 1 Reply Last reply Reply Quote 0
                  • MajorTomM Offline
                    MajorTom @julien-f
                    last edited by MajorTom

                    julien-f said in xoa, xoa-updater ignore LC variables:

                    I think it's pretty standard in C (and well supported), but I've never seen any Node CLIs handling this.

                    Though this locale is called C, it's not limited to C language.
                    "C" locale is an alias to POSIX locale.

                    https://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap07.html

                    7.2 POSIX Locale
                    
                    Conforming systems shall provide a POSIX locale, also known as the C locale
                    
                    1 Reply Last reply Reply Quote 0
                    • julien-fJ Offline
                      julien-f Vates 🪐 Co-Founder XO Team
                      last edited by

                      Yes, I know this is not exclusive to C, but there are some facilities to handle this, that are, as far as I know, not available in Node.

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post