public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] python3 question
@ 2021-01-13 18:31 n952162
  2021-01-13 18:57 ` n952162
  2021-01-13 18:59 ` Grant Edwards
  0 siblings, 2 replies; 10+ messages in thread
From: n952162 @ 2021-01-13 18:31 UTC (permalink / raw
  To: Gentoo User list

Hello.  In python3, how do you do this?

tgt = 'gebuchte Umsätze;'

In python2, you could do this:

tgt = unicode ('gebuchte Umsätze;'.decode ('latin1'))

but that gives:

SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xe4 in
position 12: invalid continuation byte

In fact, any constant with ä in it will give you that.




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-01-13 21:31 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-13 18:31 [gentoo-user] python3 question n952162
2021-01-13 18:57 ` n952162
2021-01-13 19:41   ` n952162
2021-01-13 19:43     ` [gentoo-user] python3 question [RESOLVED] n952162
2021-01-13 19:57     ` [gentoo-user] Re: python3 question Grant Edwards
2021-01-13 20:06       ` n952162
2021-01-13 20:22         ` Victor Ivanov
2021-01-13 21:31           ` n952162
2021-01-13 18:59 ` Grant Edwards
2021-01-13 19:09   ` n952162

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox