From: | n952162 <n952162@×××.de> |
---|---|
To: | Gentoo User list <gentoo-user@l.g.o> |
Subject: | [gentoo-user] python3 question |
Date: | Wed, 13 Jan 2021 18:32:05 |
Message-Id: | 3a417d99-a60e-8526-9df9-983894253885@web.de |
1 | Hello. In python3, how do you do this? |
2 | |
3 | tgt = 'gebuchte Umsätze;' |
4 | |
5 | In python2, you could do this: |
6 | |
7 | tgt = unicode ('gebuchte Umsätze;'.decode ('latin1')) |
8 | |
9 | but that gives: |
10 | |
11 | SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xe4 in |
12 | position 12: invalid continuation byte |
13 | |
14 | In fact, any constant with ä in it will give you that. |
Subject | Author |
---|---|
Re: [gentoo-user] python3 question | n952162 <n952162@×××.de> |
[gentoo-user] Re: python3 question | Grant Edwards <grant.b.edwards@×××××.com> |