我试图从Qpython打印Unicode字符

发布于 2025-01-22 07:37:14 字数 223 浏览 0 评论 0原文

尝试打印诸如Qpython 3.6(在带有Chrome OS 100的Chromebook上的Android下)之类的Unicode字符,但打印(U“┌┌┝├”)什么也没打印,并且使用\ u不起作用,因为\是QPYTHON中的线延续特征。也许对Android-Over-Chrome Os-over-Linux的夹有夹有夹心使这不可能 - 这肯定超出了我的诊断能力 - 但我希望像Python这样的高级语言可能能够弥合这一差距...

Trying to print unicode characters like ┌┌┝├ from QPython 3.6 (under Android on a Chromebook with Chrome OS 100) but print(u"┌┌┝├") prints nothing, and using \u doesn't work since \ is the line continuation character in QPython. Perhaps the sandwiching of Android-over-Chrome OS-over-Linux makes this impossible - it's certainly beyond my diagnostic abilities - but I was hoping that a high-level language like Python might be able to bridge that gap...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

铃予 2025-01-29 07:37:14

经过更多的研究,看起来Qpython 3.6的Chr()函数不接受u“ whthing”包含ASCII集外的字符,即。它根本不做Unicode

After a little more research it looks as though QPython 3.6's chr() function doesn't accept u"whatever" containing characters outside the ASCII set, ie. it isn't doing unicode at all

雨后咖啡店 2025-01-29 07:37:14

好的,请回答,既简单又羞辱地荒谬。浪费了几个小时的阅读文档和论坛后,当我注意到“偏好”按钮的“偏好”按钮,在Qpython控制台屏幕的顶部角(但不是编辑器屏幕)时,我正在运行Unicode测试程序。这些偏好包括一个tick框“默认为utf-8”,并立即解决了我的问题。我确实非常喜欢Qpython,但是它的文档,帮助和UI设计简直令人震惊 - 我花了两年的时间才找到这个盒子,而且没有人提到过。

OK, have answer, both simple and humiliatingly ridiculous. After wasting hours reading docs and forums, I was running my Unicode test program when I noticed the 'preferences' button, at top-right corner of QPython console screen (but not of editor screen) greyed-out so as to be almost illegible. Among those preferences is a tick box 'Default to UTF-8' and ticking it instantly cured my problems. I do love QPython very much, but its documentation, help and UI design are simply appalling - it's taken me two years to find this box, and no-one has ever mentioned it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文