Unable to translate bytes [FC] at index 35 from specified code page to Unicode

前端 未结 4 490
你的背包
你的背包 2021-01-02 06:56

I\'m trying to send an object like this to my REST API(built with asp net core)

{
    \"firstName\":\"tersü\",
    \"lastName\":\"asda\"
}

4条回答
  •  温柔的废话
    2021-01-02 07:19

    Although the Content-Type is charset UTF-8 the received byte code FC denotes the extended ASCII character 252 which represents the umlaut "ü".

    In a UTF-8 encoding the umlaut "ü" consists of two bytes. So there is a mismatch between the given encoding header and the transmitted data. So you have to check the code which generates the request.

提交回复
热议问题