Hacker Blogs
Work in progress: 15,409 of 181,233 sites checked so far, more every week · updated 2 Nov 2026Missing a blog? Tell us

Top all-time · #1620

H

Henri Sivonen

Personal blog · hsivonen.fiprogrammingwebsystems

Henri Sivonen's personal blog at hsivonen.fi covers programming, web and systems. Since 2013, 47 different Hacker News readers have linked it 67 times, most often “String Lengths in Unicode”. The last post was in 2022, but the archive is still widely read.

Visit the blog
67mentions?
47HN people?
2013–2025first – last linked?
Links on Hacker News per year · peak 9 in 2022

Most-linked posts?

  1. String Lengths in Unicode
    14 people · 14 mentions · first linked 2019-09-09
  2. Chardetng: A More Compact Character Encoding Detector for the Legacy Web
    4 people · 4 mentions · first linked 2020-06-08
  3. Why Supporting Unlabeled UTF-8 in HTML on the Web Would Be Problematic
    3 people · 5 mentions · first linked 2020-02-20
  4. /png-gamma/
    3 people · 3 mentions · first linked 2015-09-10
  5. /eme/
    3 people · 3 mentions · first linked 2014-01-15
  6. How I Wrote a Modern C++ Library in Rust
    3 people · 3 mentions · first linked 2018-12-03
  7. The Text Encoding Submenu Is Gone
    2 people · 2 mentions · first linked 2021-08-24
  8. How to Avoid Being Called a Bozo When Producing XML (2005)
    2 people · 2 mentions · first linked 2014-02-27
  9. Activating Browser Modes with Doctype
    2 people · 2 mentions · first linked 2014-10-28
  10. How many replacement characters?
    2 people · 2 mentions · first linked 2017-05-31

What Hacker News says?

  1. > The argument for DRM is that it ships in a sandbox built by Mozilla. Actually, I was long since wondering how exactly that sandbox works, so if you have some more information about that, I'd appreciate it. Henri Sivonen's general explanation of EME and CDMs[1] tells the following: > A CDM could be bundled with the browser, downloaded separately, bundled with the operating system, embedded in hardware as firmware r…

    Comment linking /eme/

    on “Mozilla lays off 250 employees while it refocuses on commercial products”
  2. Submitted How I Wrote a Modern C++ Library in Rust as a story · 406 points

    HN discussion
  3. > Why can't we assume UTF-8 unless told otherwise? See https://hsivonen.fi/utf-8-detection/

    Comment linking /utf-8-detection/

    on “My Current HTML Boilerplate”
  4. Submitted String Lengths in Unicode as a story · 230 points

    HN discussion
  5. > in the case of offline where there are no http headers, the browser works out what encoding to use For file: URLs, Firefox and, a bit less reliably, Chrome do work out that an HTML file is UTF-8. Safari does not. > And since utf-8 is the only valid charset for HTML5 Correct. > it should be the default. It isn't. See https://hsivonen.fi/utf-8-detection/ for why. Having <meta charset="UTF-8"> in the boilerplate is g…

    Comment linking /utf-8-detection/

    on “My Current HTML Boilerplate”
  6. Submitted It’s not wrong that "\u{1F926}\u{1F3FC}\u200D\u2642\uFE0F".length == 7 (2019) as a story · 195 points

    HN discussion
  7. > Note that they are not actually removing any encodings themselves, so the argument from security / attack surface doesn't arise: the website can still send text in any of those encodings (or malformed but autodetected as such). No. If the visitor is able to freely choose the page encoding, then the attacker can lure one into doing so by presenting a seemingly malformed partial text. So it will allow the attacker t…

    Comment linking /encoding-telemetry/

    on “I have no capslock and I must scream”
  8. Submitted String length functions for single emoji characters evaluate to greater than 1 as a story · 116 points

    HN discussion
  9. If a site with an EV cert is being spoofed using a similar-looking domain name and a DV cert, how realistically is the user going to remember that the real site is supposed to have an EV cert? (Besides just maybe remembering it for Paypal in particular.) See also the Nordea section at https://hsivonen.fi/bank-idp/ . How is a user supposed to form a mental model about multi-server org who don't use EV consistently?

    Comment linking /bank-idp/

    on “Intent to Deprecate and Remove: Trust in Existing Symantec-Issued Certificates”
  10. Submitted How to Avoid Being Called a Bozo When Producing XML (2005) as a story · 107 points

    HN discussion
  11. > Could you please describe a bit more about the browser-CDM interaction and what is implemented there? I don't really know what this interaction looks like in non-Firefox browsers. Last I checked, the CDMs Chrome ships didn't work with Chromium, but I don't know whether that's still true, and I don't know whether the browser-side bits involved are implemented at all in Chromium or just in Chrome. Likewise, I don't…

    Comment linking /eme/

    on “Save Firefox”
  12. Submitted How many replacement characters? as a story · 93 points

    HN discussion
  13. I think the current approach is to just invent yet another "meta layer" of characters and declare that this particular sequence of bytes/codepoints/surrogate pairs/grapheme clusters/extended grapheme clusters/zwj sequences/whatever else you can think of has a special meaning and does not behave like you think it does. See also Henri Sivonen's essay on unicode string length [1] So in a way, Unicode is already long pa…

    Comment linking /string-length/

    on “U+237C ⍼ Right Angle with Downwards Zigzag Arrow”
  14. Submitted Chardetng: A More Compact Character Encoding Detector for the Legacy Web as a story · 63 points

    HN discussion
  15. https://hsivonen.fi/eme/ explains what EME is . Granted, it might not explain "what is going on".

    Comment linking /eme/

    on “Requirements for DRM in HTML are confidential”
  16. Submitted Activating Browser Modes with Doctype as a story · 33 points

    HN discussion
  17. I think Acid2 was partly responsible for this. See https://hsivonen.fi/last-html-quirk/

    Comment linking /last-html-quirk/

    on “Google HTML/CSS Style Guide – Omit Optional Tags”
  18. Submitted It’s Not Wrong that “ ”.length == 7 as a story · 20 points

    HN discussion
  19. https://news.ycombinator.com/item?id=23290506 https://coaxion.net/blog/2017/09/exporting-a-gobject-c-api-f... https://hsivonen.fi/modern-cpp-in-rust/ http://hansihe.com/2017/02/05/rustler-safe-erlang-elixir-nif...

    Comment linking /modern-cpp-in-rust/

    on “Chromium project finds that 70% of security defects are memory safety problems”
  20. Submitted IME Smoke Testing as a story · 7 points

    HN discussion
  21. It is up to the implementation. This is a good read on aspects of it: https://hsivonen.fi/string-length/

    Comment linking /string-length/

    on “Emoji Under the Hood”
  22. Submitted What is EME? as a story · 5 points

    HN discussion
  23. > e.g. removed C++ code that has later found to have bugs The article links to a longer article ( https://hsivonen.fi/encoding_rs/ ) about encoding_rs. The longer article mentions a bug that got fixed in Firefox ESR after the code had been replaced with encoding_rs in non-ESR Firefox. (I wrote the bug, too, though.) > or newly re-written crates now more useful to the wider community than the same code locked up in C…

    Comment linking /encoding_rs/

    on “How I Wrote a Modern C++ Library in Rust”
  24. Submitted A string containing one emoji has length == 7 in JS and 17 in Rust as a story · 4 points

    HN discussion
  25. For writing globally appropriate software, UTF-8 is the best option that exists in practice. Note that “Asian” is quite a gamut in terms of UTF-8 size: Chinese is at the very compact end of the spectrum and the Burmese script at the other end: https://hsivonen.fi/string-length/#counts

    Comment linking /string-length/

    on “Hacking GitHub's Auth with Unicode's Turkish Dotless 'I'”
  26. Submitted The Joy of about:blank as a story · 4 points

    HN discussion
  27. You can use FF as a sentinel byte internally (I think utf8proc actually does that?); given that FE never occurs, either, if you see the byte sequence corresponding to U+FEFF BYTE ORDER MARK in one of the other UTFs you can pretty much immediately tell it can’t possibly be UTF-8. (In general UTF-8, because of all the self-synchronization redundancy, has a very distinctive pattern that allows it to be detected with al…

    Comment linking /utf-8-detection/

    on “How UTF-8 Works”
  28. Submitted Chardetng: A More Compact Character Encoding Detector for the Legacy Web as a story · 3 points

    HN discussion
  29. The polyglot syntax gets weird in CDATA elements and you have to add a bunch of talismans to the code. If you don't want to accidentally break it you shouldn't be writing XML by hand or gluing it from strings ( https://hsivonen.fi/producing-xml/ ), so you need to output only using polyglot-compatible XML+HTML serializer. That's a lot of work for case when maybe somebody will parse your markup as XML? All bots suppor…

    Comment linking /producing-xml/

    on “To close or not to close – Void HTML elements”
  30. Submitted Text Encoding Menu in 2021 as a story · 3 points

    HN discussion

Search all of HN for hsivonen.fi

Linked by the same people?