• Philipp Stephani's avatar
    Fix encoding of JSON surrogate pairs · 93be35e0
    Philipp Stephani authored
    JSON requires that such pairs be treated as UTF-16 surrogate pairs, not
    individual code points; cf. Bug #24784.
    
    * lisp/json.el (json-read-escaped-char): Fix decoding of surrogate
    pairs.
    (json--decode-utf-16-surrogates): New defun.
    
    * test/lisp/json-tests.el (test-json-read-string): Add test for
    surrogate pairs.
    93be35e0
json.el 25.2 KB