1 2 3 4 5 6 7
-- Make sure the surrogate pair calculation adds 0x10000 rather than ORing it. SELECT ascii(from_json($$ "\uD840\uDC00" $$)); ascii -------- 131072 (1 row)