Skip to content

Comment on Show HN: Print a WiFi Login Cardparent

Comments

According to the 2012 spec, the SSID _can_ have an encoding. It can optionally be either the previous byte buffer without any real limitation to it, or UTF-8 encoding.

So as hex, you would need to try both of these for your ssid: U+1F4A9 or F0 9F 92 A9

Unfortunately, encoding to UTF-8 and setting a BOM won't guarantee this will work for you, because most QR decoders actually use heuristics to guess the encoding of the text.

You can make it behave a little better by setting ECI (to specify the encoding) when creating your QR code, but even though that was introduced in 2000, most QR decoders don't have ECI implemented.

Your best bet is to try UTF-8 encoding of the emoji first, and then fallback to the unicode representation.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.