mozilla/pdf.js — pull request #1764 by nmaier (2012-05-27 19:03:12+00:00)
Title: Implement proper utf-8 decoding in stringToPDFString

Before, stringToPDFString tried to find an UTF-16 BOM, and if not
present, instread tried to decode the stream using some ad-hoc
translation table. This will not work if the string is real UTF-8
Unicode. Hence a proper UTF-8 decoder was added, and the old, ad-hoc
translation was left in as a fallback should the new decoder reject
the string.

Fixes GH-1692, and maybe others