Working in the creations of APIs with Mathematica 12.2, I got this problem with diacritics when sending JSON data.
Here is a toy code using httpbin.
HTTPRequest["https://httpbin.org/anything",
<|
Method->"POST"
,"Body" -> (<|"textWithDiacritics"-> "àéíóú"|>//ExportString[#, "RawJSON"]&)
|>
]//URLRead[#, "BodyBytes"]&//FromCharacterCode//ImportString[#, "RawJSON"]&
I found this related post, It seams to be a bug in ExportString for RawJSON.
Any suggestions on how to get around this case?
Cross post in Stack Exchange.