4

I'm trying to display these Special Characters,µß£¬, on my Docker Container running java-centos' vi editor and nano editor, but the ß character is replaced with sort of a question mark instead.

expected output: µß£¬ actual output: µ�~_£¬.

But I can echo these characters on the terminal?!?! So it's just to do with the editors not being able to display the ß character.

I've tried all the suggestions from changing the default locale from POSIX to C.UTF-8 to setting the locale to German, to no avail.

Dockerfile:

FROM nimmis/java-centos:oracle-8-jdk
ENV LANG C.UTF-8

1 Answers1

5

Okay so I've got it to work by adding this line to the Dockerfile, it's to do with the locale not being set properly on Centos7.

ENV LANG en_us.utf-8

cyqsimon
  • 2,752
  • 2
  • 17
  • 38
  • This works for me but I don't understand why it specificaly works with 'Lang' and not with 'LANG'. – Mariano LEANCE Sep 27 '21 at 23:51
  • @MarianoLEANCE it is a mistake. It worked for OP probably because the editor was coded rather loosely/leniently and is case-insensitive in reading environment variables, I've made an edit. – cyqsimon Aug 04 '23 at 05:42