- Más nuevo
- Más votos
- Más comentarios
To figure out the locale setting of your instance, please kindly check the output of locale command and try editing /etc/environment file through the following steps.
-
Check locale command and open the /etc/environment file. $ locale $ sudo nano /etc/environment
-
Add the following lines:
LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" LC_CTYPE="en_US.UTF-8"
- "Ctrl + X" to exit
- "Y" to confirm the change
- Press ENTER key
NB: This is a system wide setting.
If your application still faces error, please attach the same for further analysis.
Thanks Jeff,
Still seeing the same issue after switching locales. My system (debian based linux vm) looks like this by default:
me@cpe:
$ locale -a C C.UTF-8 POSIX gnos@cpe:$ locale LANG=C.UTF-8 LANGUAGE= 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= me@cpe:~$I installed the US utf8 and set it as default:
root@ip-10-0-0-196:/home/me# locale LANG=en_US.UTF-8 LANGUAGE= LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL=en_US.UTF-8 root@ip-10-0-0-196:/home/me#
Though the QR code is showing unrenderable chars as '?' (can't seem to attach the image)...
root@ip-10-0-0-196:/home/me# /usr/bin/qrencode -t ANSIUTF8 -o /dev/console "sampletextto test the qr code stuff"
Thanks, Peter.
Contenido relevante
- OFICIAL DE AWSActualizada hace 3 años
- OFICIAL DE AWSActualizada hace 4 meses
- OFICIAL DE AWSActualizada hace 3 años
While the formatting you're seeing is undesirable; a question: Why the need to output QR codes to a serial port? Most of the time, serial ports are for last-ditch debugging and access to servers; outputting a QR code would seem to be a pretty advanced use of that access method so I'm curious as to the why.
Without going into too much detail, our pending EC2 AMI market place offer is a network appliance and requires 2FA before we can onboard it onto a larger network. I agree using the serial port to output a QR code isn't your standard use of a serial port, though it is a good way to ensure that the person who deployed the instance (or has access to the instance via IAM) is authorised to onboard the appliance to a larger network.