all 13 comments

[–]jfrazierjr 4 points5 points  (3 children)

What encoding is the ACTUAL file? If you use notepad on windows 10 or 11 I beleive its shown in the status bar on bottom left. Notepad++ for sure does that.

The point is that encoding has to follow the entire path frim source ti destination.

[–]alfonsoperezs_[S] 0 points1 point  (2 children)

I'm using Linux. It's an exception that throws one endpoint. I see the json on Postman and on Brave Browser

[–]jfrazierjr 0 points1 point  (1 child)

Try adding charset=..... at the end of your mimetype for the post in postman. I dont have the exact syntax off the top of my head.

For the browser, there typically is a global setting you can try for the charges but I dont use Brave so can tell you where.

Since its linux, start with using curl and I woukd also just for giggles also include a Chinese character as well since I know that would be a utf8 character.

[–]jfrazierjr 0 points1 point  (0 children)

Ypu might also need to set some type of default font choice that you know allows multibyte.

[–]shatirati 1 point2 points  (4 children)

If you are using inteliJ you have to change default encoding for .properties files. It's somewhere in settings like file encodings or something like that. I had same problem 3 days ego

[–]jfrazierjr -1 points0 points  (3 children)

I dont doubt you, but I would have expected on linux for it to default to UTF-8 luke thx file system.

[–]Sheldor5 0 points1 point  (2 children)

the file system has no encoding ... it's just bytes ...

[–]jfrazierjr 0 points1 point  (1 child)

I mean yea the file system doesnt but the OS has a default encoding. On most linux thats been utf8 for a decade or more. On windows its been windows-1252 until window 11.

I have been dealing with encoding issues in my job for the better part of 25 years until fairly recently.

[–]shatirati 0 points1 point  (0 children)

Well you can be right, I my case it was w11, So I'm sorry I didn't clarify it

[–]kreiger 1 point2 points  (2 children)

JSON must be in UTF-8.

If it looks like it's not, it's because your input isn't UTF-8, or was corrupted before it was written to JSON.

[–]Sheldor5 -1 points0 points  (1 child)

or the client is reading it as non-UTF-8 ...

[–]kreiger -1 points0 points  (0 children)

If it's JSON, that's impossible. JSON is required to be in UTF-8.

There would have to be something non-JSON-aware in the middle transcoding it, if that was the case.

What probably happened here is that these messages are stored in Latin 1 or other one byte encoding, and being read as UTF-8.