[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: Converted ui file throws UnicodeEncodeError: 'utf-8' codec can't encode characters in position 1
From:       Ben Rudiak-Gould <benrudiak () gmail ! com>
Date:       2024-03-04 18:25:04
Message-ID: CAANSMWpJTKfZa9Y03_kCLouuntdzBGRwKoc2pvOPc4T2fjFMxQ () mail ! gmail ! com
[Download RAW message or body]

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 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>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic