News for hackers. Stuff that matters.
Re:A Reflection on the Small Web by smcn on Thursday September 29, 2022 @08:44AM (#33019784)
Just want to say that I love the way this page looks and think that I'm going to ~steal~ take inspiration from it.
Re:A Reflection on the Small Web by sodimel on Thursday September 29, 2022 @08:52AM (#33019874)
Thanks! I found that you need to add some kind of magic chars [0] at the beginning of the txt file in order to display utf-8 chars (prevent this éà  :P), here's how to do it:

    echo -e "\xef\xbb\xbf\n" > myfilename.txt
[0]: https://en.wikipedia.org/wiki/Byte_order_mark#UTF-8
Re:A Reflection on the Small Web by SahAssar on Thursday September 29, 2022 @10:01AM (#33020736)
I'm guessing you wouldn't need that if you set this header:

  Content-Type: text/plain; charset=utf-8
Re:A Reflection on the Small Web by sodimel on Thursday September 29, 2022 @11:14AM (#33021857)
That's another level of work :P

I created the whole https://misc.l3m.in/txt/ trying to prove a point with a friend (the point was something like "you can start a blog right away if you have a domain name and a ssh access to a server, let me show you") :D

Re:A Reflection on the Small Web by SahAssar on Thursday September 29, 2022 @01:05PM (#33023735)
You're using apache which I'm guessing you installed. If so I think adding `AddDefaultCharset utf-8` to the config should be enough, and probably easier than adding a BOM to each of your files.
Re:A Reflection on the Small Web by tiborsaas on Thursday September 29, 2022 @09:24AM (#33020273)
Oh, the good old PHP days, when the BOM was considered a source of bugs :)
Re:A Reflection on the Small Web by smcn on Thursday September 29, 2022 @09:02AM (#33019997)
Ah, good to know! Thanks!