Python中文
首页
教程
问答
标签
搜索
登录
注册
将unicode转换为unicode转义语法
回答此问题可获得
20
贡献值,回答如果被采纳可获得
50
分。
<p>unicode对象<code>u"ÿ"</code>是在Python中给出的。{it{I>如何将unicode}转换为对应的unicode}?无法让<code>unicode-escape</code>在此处工作。在</p> <p>编辑:在我的例子中,一个字符串对象的内容是<code>r"\u00FF"</code>。另一方面,我有一个unicode对象(从上面),我需要做一个字符串比较,以检查它们是否相等。我需要unicode转义语法作为上面的unicode字符的字符串对象来实现这一点。在</p>
0 条评论
分类:
Python问答
请先
登录
后评论
默认排序
时间排序
1 个回答
匿名
1天前
擅长:python、mysql、java
<pre><code>r"\u%04X" % ord(u"ÿ") </code></pre> <p>这对我很有帮助。它返回一个字符串对象(<code>'\\u00FF'</code>),我可以用它来进行字符串比较。对于<code>U+FFFF</code>以上的unicode字符,它失败,但在我的例子中,这不是必需的。在</p>
请先
登录
后评论
针对此问题:
更多的回答
关注
89
关注
收藏
1
收藏,
216
浏览
网友 提问于 2天前
相关Python问题
文本导入时标题行中的特殊字符
7 回答
文本小部件:在没有输入时更新并在循环后保持空闲
9 回答
文本小部件tkin
6 回答
文本小部件tkinter中的标签更改或文本外观更改是否有撤消功能?
4 回答
文本小部件tkinter复制图像选项
5 回答
文本小部件上的Python Tkinter ttk滚动条未缩放
9 回答
文本小部件上的滚动条可能需要根据制表符ord显示前进行滚动
10 回答
文本小部件不显示lis中的内容
8 回答
文本小部件不显示Unicode字符
7 回答
文本小部件中写入的行间距
4 回答
文本小部件中的文本作为变量
8 回答
文本小部件中的滚动条仅显示在底部
4 回答
文本小部件中的选项卡键空间计数
2 回答
文本小部件作为Lis
4 回答
文本小部件在主框架中扩展列宽
3 回答
文本小部件未使用删除功能清除
10 回答
文本小部件滚动动画(Tkinter、Python)
8 回答
文本居中。格式正确吗?
7 回答
文本差分算法
10 回答
文本已知时音频文件中的单词索引
4 回答