@movq@www.uninformativ.de What do you think about this?
diff –git a/jenny b/jenny
index b47c78e..20cf659 100755
— a/jenny
+++ b/jenny
@@ -278,7 +278,8 @@ def prefill_for(email, reply_to_this, self_mentions):
def process_feed(config, nick, url, content, lasttwt):
nick_address, nick_desc = decide_nick(content, nick)
url_for_hash = decide_url_for_hash(content, url)
new_lasttwt = parse(‘1800-01-01T12:00:00+00:00’).timestamp()
# new_lasttwt = parse(‘1800-01-01T12:00:00+00:00’).timestamp()
new_lasttwt = None
for line in twt_lines_from_content(content):
res = twt_line_to_mail(@@ -296,7 +297,7 @@ def process_feed(config, nick, url, content, lasttwt):
twt_stamp = twt_date.timestamp() if lasttwt is not None and lasttwt >= twt_stamp: continueif twt_stamp > new_lasttwt:
if not new_lasttwt or twt_stamp > new_lasttwt:
new_lasttwt = twt_stamp mailname_new = join(config['maildir_target'], 'new', twt_hash)
@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.
@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.
I believe Yarn assumes utf-8 anyway which is why we don’t see encoding issues
Are you sure? I think in #kj2c5oa @quark@ferengi.one mentioned exactly that problem. My logs say “jenny/latest” was fetching my twtxt for quark.
All I did to fix this was to adding AddCharset utf-8 .txt to .htaccess. Especially I did not change encoding of stackeffect.txt.
What about a meta header for setting charset?
I myself stumbled upon .txt files not being delivered with charset: utf-8 by default.
I had to set/modify .htaccess to correct that.
It would have been easier if there had been a charset header entry “overwriting” what http server is delivering.
What do you think?
The Lunduke Journal Podcast - Episode 8
Listen now (10 min) | New games ported to old computer platforms! ⌘ Read more
Peter Saint-Andre: Meditations on Bach #8: Two Quotes from Pablo Casals
Here are two quotes from the great cellist Pablo Casals, who re-introduced the Bach Cello Suites to the world in the early twentieth century…… ⌘ Read more
Prince of Persia ported to the Atari 8-bit computers!
The Atari XL / XE finally get a version of Prince of Persia… in 2021! ⌘ Read more
@stackeffect@twtxt.stackeffect.de
now Apache also announces content-type: text/plain; charset=utf-8
Well, that fixed things. 🥳
@quark@ferengi.one No client, those were created using date -Is and emacs. Off course all is UTF-8 encoded, but now Apache also announces content-type: text/plain; charset=utf-8
** Data Types and Variables in C **
I’ve been writing a heap of Lua lately — this has lead to my becoming interested, again, in C. Here are some ancient notes I dug up on the most basics of data types and variables in C.
All of a computer’s memory is comprised of bits. A sequence of 8 bits forms a byte. A group of bytes (typically 4 or 8) form a word. Each word is associated with a memory address. The address increases by 1 with each byte of memory.
In C, a byte is an object that is as big as t … ⌘ Read more
An estimated 6.8 million fewer female births will be recorded across India by 2030 because of the persistent use of selective abortions, researchers estimate. — The Guardian
And from the same article:
India’s skewed ratio of men to women – currently between 900-930 females per 1,000 males – reflects India’s ingrained attitude towards girls. Boys are seen as breadwinners while girls are seen as a burden across every social class. Boys are more likely to receive more nutritious food and better medical care than girls.
That is just beyond sad.
@movq@www.uninformativ.de This is my env, on language:
LANGUAGE=en_US.UTF-8
LANG=en_US.UTF-8
LC_ALL=en_US.UTF-8
I had to explicitly set it on the cron job to make jenny work.
@quark@ferengi.one I mean, if LANG=en_US.UTF-8 were a problem, it wouldn’t run manually, right? Or is it that the variable isn’t defined under cron?
@lyse@lyse.isobeef.org Yes, I have LANG=en_US.UTF-8 on my system. So, it is not that it can’t find the config?
@movq@www.uninformativ.de I am getting this when I run it on cron (extra lines in between becuase otherwise jenny will make them a mash):
Traceback (most recent call last):
File “/home/quark/jenny/jenny”, line 565, in
if not retrieve_all(config):
File “/home/quark/jenny/jenny”, line 373, in retrieve_all
refresh_self(config)
File “/home/quark/jenny/jenny”, line 294, in refresh_self
process_feed(config, config[‘self_nick’], config[‘self_url’], content)
File “/home/quark/jenny/jenny”, line 280, in process_feed
fp.write(mail_body)
File “/usr/lib/python3.8/encodings/iso8859_15.py”, line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: ‘charmap’ codec can’t encode character ‘\U0001f4e3’ in position 31: character maps to
The 1985 online service for 48k Atari computers: Games Computers Play Network
The game-focused, 8-bit, joystick-driven, Atari-only On-Line service of the ‘80s. ⌘ Read more
🙌 Liked: Introduction — Learning APL ⌘ Read more
I want to somehow use my monome grid to build out coarse vocal tract shapes for a physical model like !voc or @!(sndkitref “tract”)!@. 16 diameters with 8 steps of resolution, or 32 diameters with 4 steps of resolution. #halfbakedideas
Kaidan: Kaidan 0.8 released: Typing notifications & message synchronization ⌘ Read more…
http://ronanlebreton.com/8-conseils-pour-ecrire-de-la-fantasy/?utm_content=buffer23e26&utm_medium=social fantasy écriture
http://www.commentcamarche.net/forum/affich-2673470-codage-des-images-8-bits-vs-16-bits encodage image photo rvb
A Birthday Challenge as Docker Turns 8 ⌘ Read more…
Code Log: In which I explore how to make sounds ⌘ Read more…
Prosodical Thoughts: Prosody 0.11.8 released ⌘ Read more…
Ignite Realtime Blog: Push Notification Openfire plugin 0.8.0 released ⌘ Read more…
Are you able to coax your webserver to add the charset to the content type header? Browsers are having a hard time thinking you are sending latin-1
content-type: text/plain; charset=utf-8
🧮 USERS:1 FEEDS:6 TWTS:223 BLOGS:1 ARCHIVED:23273 CACHE:9748 FOLLOWERS:8 FOLLOWING:31
🧮 USERS:1 FEEDS:6 TWTS:222 BLOGS:1 ARCHIVED:23273 CACHE:9683 FOLLOWERS:8 FOLLOWING:31
🧮 USERS:1 FEEDS:6 TWTS:221 BLOGS:1 ARCHIVED:23273 CACHE:9659 FOLLOWERS:8 FOLLOWING:31
🧮 USERS:1 FEEDS:6 TWTS:220 BLOGS:1 ARCHIVED:23273 CACHE:9636 FOLLOWERS:8 FOLLOWING:31
Monal IM: 4.8 for iOS released, new mac beta ⌘ https://monal.im/blog/4-8-for-ios-released-new-mac-beta/
realtime lighting in pico8: [[https://medium.com/hackernoon/pico-8-lighting-part-1-thin-dark-line-8ea15d21fed7]] #links #graphics #pico8 #pixelart
typography in 8 bits: system fonts: [[https://damieng.com/blog/2011/02/20/typography-in-8-bits-system-fonts]] #links #typography #1bit #8bit #pixelart
Monal IM: News betas up for 4.8 ⌘ https://monal.im/blog/news-betas-up-for-4-8/
OpenWrt on my new WRT1200AC! My ancient printer needs WPS, but BusyBox is calling the button �wps right now. H’m, UTF-8 is supported…
OpenWrt on my new WRT1200AC! My ancient printer needs WPS, but BusyBox is calling the button �wps right now. H’m, UTF-8 is supported…
Monal IM: Mac 4.8 beta is out ⌘ https://monal.im/blog/mac-4-8-beta-is-out/
Monal IM: Monal 4.8 coming with improved notifications and translations ⌘ https://monal.im/blog/monal-4-8-coming-with-improved-notifications-and-translations/
Aditya Borikar: Chapter 8: Reworking FSM ⌘ https://adiaholic.github.io/gsoc2020/2020/07/12/Chapter-8-Reworking-FSM.html
sc-im: A Vim-inspired Excel replacement! ⌘ https://www.youtube.com/watch?v=K_8_gazN7h0
Digital Spring Cleaning ⌘ https://aaronparecki.com/2020/04/01/8/digital-spring-cleaning
Mob Psycho 100 - My Favourite Anime - YouTube https://www.youtube.com/watch?v=k-DyIWF0h-8
The government is using wrong data to make decisions about the internet - Recode https://www.recode.net/2019/2/8/18211794/government-data-internet
Best of 2013: The Man Who Invented Modern Probability - Issue 8: Home - Nautilus http://nautil.us/issue/8/Home/best-of-2013-the-man-who-invented-modern-probability