我试着用
locale.setlocale(locale.LC_ALL, 'ar_AE.UTF-8')在Django应用程序中,在docker环境中运行,使用python:3.9.6-瘦
但它给出了不支持的地区设置错误。
我尝试在Dockerfile中安装区域设置
RUN apt-get install -y locales
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
&& sed -i -e 's/# ar_AE.UTF-8 UTF-8/ar_AE.UTF-8 UTF-8/' /etc/locale.gen \
&& locale-gen
ENV LANG ar_AE.UTF-8
ENV LC_ALL ar_AE.UTF-8但这并没有解决问题
谁知道怎么解决这个问题?
发布于 2022-04-14 09:06:50
您还应该安装locales-all包:
apt-获取安装-y区域设置-所有
https://stackoverflow.com/questions/69621584
复制相似问题