1 |
On 1/13/21 7:31 PM, n952162 wrote: |
2 |
> Hello. In python3, how do you do this? |
3 |
> |
4 |
> tgt = 'gebuchte Umsätze;' |
5 |
> |
6 |
> In python2, you could do this: |
7 |
> |
8 |
> tgt = unicode ('gebuchte Umsätze;'.decode ('latin1')) |
9 |
> |
10 |
> but that gives: |
11 |
> |
12 |
> SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xe4 in |
13 |
> position 12: invalid continuation byte |
14 |
> |
15 |
> In fact, any constant with ä in it will give you that. |
16 |
> |
17 |
> |
18 |
|
19 |
Okay, I see that if your locale is not C, you can do: |
20 |
|
21 |
tgt = 'gebuchte Umsätze;' |