12 ms·
Just want to say that I love the way this page looks and think that I'm going to ~steal~ take inspiration from it.
by smcn 4y ago
Just want to say that I love the way this page looks and think that I'm going to ~steal~ take inspiration from it.
- sodimel 4y agoThanks! 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 https://en.wikipedia.org/wiki/Byte_order_mark#UTF-8
- smcn 4y agoAh, good to know! Thanks!
- tiborsaas 4y agoOh, the good old PHP days, when the BOM was considered a source of bugs :)
- SahAssar 4y agoI'm guessing you wouldn't need that if you set this header: Content-Type: text/plain; charset=utf-8
- sodimel 4y agoThat's another level of work :P I created the whole https://misc.l3m.in/txt/ 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
- SahAssar 4y agoYou'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.