LinuxCNC / linuxcnc

LinuxCNC controls CNC machines. It can drive milling machines, lathes, 3d printers, laser cutters, plasma cutters, robot arms, hexapods, and more.
http://linuxcnc.org/
GNU General Public License v2.0
1.8k stars 1.15k forks source link

The LinuxCNC configuration selector does not support Unicode README files. #2411

Open issuefiler opened 1 year ago

issuefiler commented 1 year ago

The version

The latest. LinuxCNC 2.10.0~pre0.

The system environment

$ locale 
LANG=C
LANGUAGE=
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=

The issue

The LinuxCNC configuration selector does not support Unicode README files.

A Unicode README file

” appears as “â.”

SebKuzminsky commented 1 year ago

This does look annoying :-( PR gratefully solicited...

havardAasen commented 7 months ago

The application pickconfig.tcl supports UTF-8, it does this by reading in the localesetting. The problem is that you set the locale to C which limits its ability to correctly display and manage all characters. You can't expect it to display UTF-8 characters if you tell it to display a different character set.

luzpaz commented 1 month ago

Is there a workaround ?

andypugh commented 3 weeks ago

Interestingly Unicode support is one of the few new things in the new version of Tcl. (And a new version of Tcl is a rare event: https://www.theregister.com/2024/10/02/tcltk_version_9/?utm_medium=share&utm_content=article&utm_source=linkedin )

andypugh commented 3 weeks ago

The workaround is to use a real locale, rather than the basic "C" locale, which only supports 8-bit standard ASCII. I don't know if there is any way to work around this inside the LinuxCNC code.