in reply to Re^4: Best Way to Get Length of UTF-8 String in Bytes?
in thread Best Way to Get Length of UTF-8 String in Bytes?

I can only think of one UTF-16 has that UTF-8 doesn't: It's not mistakable for iso-8859-*.

IIRC, UTF-8 with BOM is unmistakable for iso-8859-*. :)

  • Comment on Re^5: Best Way to Get Length of UTF-8 String in Bytes?

Replies are listed 'Best First'.
Re^6: Best Way to Get Length of UTF-8 String in Bytes?
by ikegami (Patriarch) on Apr 25, 2011 at 06:59 UTC
    True, but very few database fields, HTML element contents, strings, etc start with a BOM. In fact, it wouldn't even be appropriate for them to start with a BOM.