在我的系统上,语言环境变量LC_CTYPE设置为非法值,这会导致 Linux 系统出现问题。它设置为:
$ locale
LANG=
LC_COLLATE="C"
LC_CTYPE="UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=
Run Code Online (Sandbox Code Playgroud)
LC_CTYPE=UTF-8不是 Linux 上的合法值;例如。:
$ ssh front1
Linux front1 3.16.0-7-amd64 #1 SMP Debian 3.16.59-1 (2018-10-03) x86_64
The programs included with the Debian GNU/Linux system are free software;
…
alex@front1 ~> perl
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LANG = "en_US"
are supported and installed on your system.
perl: warning: …Run Code Online (Sandbox Code Playgroud) 由于本地化的原因,欧洲和美国键盘之间的大多数差异都是有意义的。然而,我一直觉得美式键盘做得更好的一件事(我使用过的所有欧式键盘似乎都有这个缺陷),就是在数字 1 旁边有 ~ 符号。欧盟键盘在里面有 ` 键点。要输入波浪号,我必须按回车键旁边的 shift+#,这是我经常使用的符号的尴尬组合。
~的用途:
`的用途:
现在,如您所见,与在 PHP 中执行 shell 命令相比,您可能更频繁地在命令行上使用主目录,并且使用 approx 的可能性比在 SO/SF/SU 上转义的可能性高出大约 10 亿倍。
有谁知道这些键被切换的原因?
为什么LC_ALL在 Linux 和 Unix 机器上默认总是未设置?
例如,在 Linux 上:
root@icubes:[~]# locale
LANG=en_US.UTF-8
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=
Run Code Online (Sandbox Code Playgroud)
在 AIX 上:
root@matic:[/]# locale
LANG=en_US
LC_COLLATE="en_US"
LC_CTYPE="en_US"
LC_MONETARY="en_US"
LC_NUMERIC="en_US"
LC_TIME="en_US"
LC_MESSAGES="en_US"
LC_ALL=
Run Code Online (Sandbox Code Playgroud) 我公司的许多代理收到的电子邮件仍然包含 Barracuda(垃圾邮件防火墙)标头(即使在“消息”视图中,而不是“源”视图中)并且以 Base64 编码。
他们大部分是从海外发送的,所以有可能是地区冲突吗?IE。如果有一个亚洲字符被发送,首先需要 Base64 编码。
我们的邮件服务器是 SmarterMail Enterprise 14.5 和 Intermedia Exchange, Barracuda Firmware v7.1.1.003 (2015-09-28 16:36:19)
示例: 并排比较用户在 Barracuda 中看到的内容和图像来源。
所以大部分标题仍然对用户隐藏,但电子邮件仍然不应该像这样显示。
我怀疑导致问题的原因如下:
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
Run Code Online (Sandbox Code Playgroud)
这是一个语言环境/编码问题,让我们的垃圾邮件防火墙感到困惑吗?
我在服务器(Debian GNU/Linux 6.0.6(squeeze))上使用 \xe2\x80\x98exif\xe2\x80\x99 ,与我的开发计算机(Mac OS X 通过 MacPort)不同,它以法语运行:
\n\nexif -h\nUtilisation: exif [OPTION...] fichier\n -v, --version Display software version\n -i, --ids Montre les ID plut\xc3\xb4t que les noms des marqueurs\n -t, --tag=marqueur S\xc3\xa9lection du marqueur\n --ifd=IFD S\xc3\xa9lection de l'IFD\n -l, --list-tags Liste tous les marqueurs EXIF\n -|, --show-mnote Show contents of tag MakerNote\n --remove Supprime le marqueur ou l'ifd\n -s, --show-description Montre la description du marqueur\n -e, --extract-thumbnail Extrait la vignette\n -r, --remove-thumbnail Supprime la vignette\n -n, --insert-thumbnail=FICHIER Ins\xc3\xa8re …Run Code Online (Sandbox Code Playgroud) 这一切都是从我想在运行 Debian 的 Beaglebone Black 上安装自定义守护进程开始的,update-rc.d mydaemon defaults 97就像我在 Mint 主机上开发过程中多次做过的那样。迎接我的是:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_PAPER = "es_CL.UTF-8",
LC_ADDRESS = "es_CL.UTF-8",
LC_MONETARY = "es_CL.UTF-8",
LC_NUMERIC = "es_CL.UTF-8",
LC_TELEPHONE = "es_CL.UTF-8",
LC_IDENTIFICATION = "es_CL.UTF-8",
LC_MEASUREMENT = "es_CL.UTF-8",
LC_NAME = "es_CL.UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
update-rc.d: using dependency based boot …Run Code Online (Sandbox Code Playgroud) RUN apt-get update && \
# Install locales
apt-get install -y locales && \
# Set locale
sed --in-place '/en_US.UTF-8/s/^# //' /etc/locale.gen && \
locale-gen && \
# Set system locale (add line)
echo "export LANG=en_US.UTF-8" >> /etc/profile && \
# Set system timezone (add line)
echo "export TZ=UTC" >> /etc/profile && \
# If the user will not change, we must source
source /etc/profile
Run Code Online (Sandbox Code Playgroud)
我在 GitLab 管道中使用该图像,并显示以下内容:
$ cat /etc/profile
# /etc/profile: system-wide .profile file for the Bourne shell …Run Code Online (Sandbox Code Playgroud)