阿拉伯文字无法正确打印python3

问题描述 投票:0回答:1

此问题不是重复的,请不要关闭。

我编辑了帖子以获取更多详细信息:

可以解决此问题吗?

from tkinter import *

root = Tk()
root.geometry('400x100+400+100')
text1 = 'السلام عليكم'
root.title(text1)
label1 = Label(root, text=text1).pack()
root.mainloop()

输出:

enter image description here

python-3.x tkinter unicode arabic python-unicode
1个回答
0
投票

尝试使用其他编辑器或编译器。您的编辑器可能未显示正确的Unicode。或尝试在代码中编码UTF-8和/或检查编辑器设置。

© www.soinside.com 2019 - 2024. All rights reserved.