[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re:Re: Converted ui file throws UnicodeEncodeError: 'utf-8' codec can't encode characters in positio
From: "Zhao Lee" <lizhao0512 () 126 ! com>
Date: 2024-03-05 1:21:47
Message-ID: 4f321110.1a8f.18e0c33d41a.Coremail.lizhao0512 () 126 ! com
[Download RAW message or body]
[Attachment #2 (text/plain)]
So is it a bug with Qt, PyQt, or Python?
The PyQT5 version works well, but not PyQt6.
--
Sincerely,
Zhao Li
At 2024-03-05 02:25:04, "Ben Rudiak-Gould" <benrudiak@gmail.com> wrote:
The problem is that U+1F427 (F0 9F 90 A7) in the source is being converted \
to \ud83d\udc27 in the string literal when it should be \U0001f427 (or F0 \
9F 90 A7 since the file encoding is UTF-8 anyway). That would have worked \
in earlier Python versions on platforms where wchar_t is 2 bytes, but \
current versions use UTF-32 internally.
[Attachment #3 (text/html)]
<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><p \
style="margin: 0;">So is it a bug with Qt, PyQt, or Python?</p><p \
style="margin: 0;">The PyQT5 version works well, but not \
PyQt6. </p><div style="position:relative;zoom:1"><p style="margin: \
0">--</p><div style="margin:0;">Sincerely,</div><div style="margin:0;">Zhao \
Li</div><div style="clear:both"></div></div><div \
id="divNeteaseMailCard"></div><p style="margin: 0;"><br></p><p>At \
2024-03-05 02:25:04, "Ben Rudiak-Gould" <benrudiak@gmail.com> \
wrote:</p><blockquote id="isReplyContent" style="PADDING-LEFT: 1ex; MARGIN: \
0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><div dir="ltr"><div \
class="gmail_quote">The problem is that U+1F427 (F0 9F 90 A7) in the source \
is being converted to \ud83d\udc27 in the string literal when it should be \
\U0001f427 (or F0 9F 90 A7
since the file encoding is UTF-8 anyway). That would have worked in earlier \
Python versions on platforms where wchar_t is 2 bytes, but current versions \
use UTF-32 internally.</div><div class="gmail_quote"><br></div></div> \
</blockquote></div>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic