Re: Email parsing and unicode/utf8

2018-10-15 Thread dieter
Thomas Jollans writes: > I just stumbled over some curious behaviour of the stdlib email parsing > APIs which accept strings rather than bytes. It appears that you can't > parse an 8-bit UTF-8 message you have as a str without first encoding it. The primary purpose of an email parser is likely th

Email parsing and unicode/utf8

2018-10-15 Thread Thomas Jollans
Hi, I just stumbled over some curious behaviour of the stdlib email parsing APIs which accept strings rather than bytes. It appears that you can't parse an 8-bit UTF-8 message you have as a str without first encoding it. The docs