Utf-8 test only:
@prologic@twtxt.net @movq@www.uninformativ.de
Exactly, you see correct UTF-8 encoded version (even with content-type: text/plain
leaving out charset declaration).
After following utf8test twtxt myself I now see that jenny
does not handle it as UTF-8 when charset is missing from HTTP header, just like @quark@ferengi.one has observed.
So should jenny
treat twtxt files always as UTF-8 encoded? I’m not sure about this.
@movq@www.uninformativ.de
I’m not a Python programmer, so please bear with me.
The doc about encodings does also mention:
If you require a different encoding, you can manually set the Response.encoding property
Wouldn’t that be a one liner like (Ruby example)?
'some text'.force_encoding('utf-8')
I understand that you do not want to interfere with requests
. On the other hand we know that received data must be utf-8 (by twtxt spec) and it does burden “publishers” to somehow add charset
property to content-type
header. But again I’m not sure what “the right thing to do” ™ is.
@movq@www.uninformativ.de
I just pulled it, works like a charm (as expected) ;-)