Fix value encoding, force key to be uppercase.