Closed mikkel1156 closed 2 years ago
Why do you use windows-1252 to convert the post data? It seems you are already sending utf8 data. I would try 2 things. First set utf8 here: byte[] dbData = files.get("postData").getBytes("windows-1252");
Or try set windows-1252 here too:
FileOutputStream out = new FileOutputStream(wwwDir +"/databases/_"+ filename);
What I'm trying to do is send an array buffer to the server, I do this by decoding the object into UTF-8 to then send. I can see in the Network tab of the Inspector that it sends the correct data and that it is successful. However, on the receiving end of the server, I don't get the same POST data that I sent. I'm thinking it has something to do with encoding but am unsure where it causes trouble.
The code that sends the request:
The serve code on the server in question: