We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
Klaus A.
9 years agoHelpful | Level 5
Umlauts in file names
Hi, I am using the v2 API for http. What I found is that if a file or folder name contains a special character, like a German Umlaut like ä, I get a 400 error on upload and download. Is this a bug? ...
Greg-DB
Dropbox Community Moderator
9 years agoFor example, in C#, using Json.NET/JsonTextWriter, that would look like:
var sb = new StringBuilder();
var textWriter = new JsonTextWriter(new StringWriter(sb));
textWriter.StringEscapeHandling = StringEscapeHandling.EscapeNonAscii;
// Write things to text writer
textWriter.WriteStartArray();
textWriter.WriteValue("Hello");
...
var result = sb.toString().Replace("\x7f", "\\u007f");
Or, using Json.NET/JsonConvert:
var serializerSettings = new JsonSerializerSettings();
serializerSettings.StringEscapeHandling = StringEscapeHandling.EscapeNonAscii;
var result = JsonConvert.SerializeObject(..., serializerSettings);
result = result.Replace("\x7f", "\\u007f");
developer_net
9 years agoExplorer | Level 4
Thank you Klaus!
Upgrading vom Json.net 4.5 to 10 and using the StringEscapeHandling.EscapeNonAscii solves my problem ;-)
Best regards, Horst
Upgrading vom Json.net 4.5 to 10 and using the StringEscapeHandling.EscapeNonAscii solves my problem ;-)
Best regards, Horst
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!