Ask a Question

Unicode Characters Encoding Issue

venkikalva
Occasional Visitor

Unicode Characters Encoding Issue

I am having an encoding Issue in .Net core Application. Here are the details: When i submit a request through postman to my .net core web api with request body contains special characters as below (жарко). I could able to serialize them and get the response back as special characters. Followed microsoft document: https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/character-encoding { "Date": "2019-08-01T00:00:00-07:00", "TemperatureCelsius": 25, "Summary": "жарко" } But when i submit the same Request using SoapUi tool, the Summary field in the request body is converting as (??????) and am unable to serialize them. I have followed the jsonserializerOptons but did not work for me . options = new JsonSerializerOptions { Encoder = JavaScriptEncoder.Create(UnicodeRanges.BasicLatin, UnicodeRanges.Cyrillic), WriteIndented = true }; jsonString = JsonSerializer.Serialize(weatherForecast, options); Could someone help me, whats is happening with SoapUi request and unable to serialize it on c# side?

0 REPLIES 0
cancel
Showing results for 
Search instead for 
Did you mean: