<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Accented characters in file name in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Accented-characters-in-file-name/m-p/222771#M11934</link>
    <description>&lt;P&gt;For these calls with the parameters in the header, you need to escape these characters. That is, when you use the “Dropbox-API-Arg” header, you need to make it “HTTP header safe”. This means using JSON-style “\uXXXX” escape codes for the character 0x7F and all non-ASCII characters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Some, but not all, languages/libraries do this for you.&amp;nbsp;For example, in C#, using Json.NET/JsonTextWriter, that would look like:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;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");&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or, using Json.NET/JsonConvert:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;var serializerSettings = new JsonSerializerSettings();
serializerSettings.StringEscapeHandling = StringEscapeHandling.EscapeNonAscii;

var result = JsonConvert.SerializeObject(..., serializerSettings);
result = result.Replace("\x7f", "\\u007f");&lt;/PRE&gt;</description>
    <pubDate>Wed, 24 May 2017 19:39:14 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2017-05-24T19:39:14Z</dc:date>
    <item>
      <title>Accented characters in file name</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Accented-characters-in-file-name/m-p/222655#M11919</link>
      <description>&lt;P&gt;I m using Dropbox V2 API &amp;nbsp;and when try to upload a file with name 'tête-à-tête' getting following error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error in call to API function "files/upload_session/finish": HTTP header "Dropbox-API-Arg": could not decode input as JSON&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also if my folder name is 'tête-à-tête' then uploading any file inside it also goes to folder 't�te-�-t�te'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this case Accented character changed in header.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I m using .Net with C#&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please suggest.&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:22:18 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Accented-characters-in-file-name/m-p/222655#M11919</guid>
      <dc:creator>anildbest83</dc:creator>
      <dc:date>2019-05-29T09:22:18Z</dc:date>
    </item>
    <item>
      <title>Re: Accented characters in file name</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Accented-characters-in-file-name/m-p/222771#M11934</link>
      <description>&lt;P&gt;For these calls with the parameters in the header, you need to escape these characters. That is, when you use the “Dropbox-API-Arg” header, you need to make it “HTTP header safe”. This means using JSON-style “\uXXXX” escape codes for the character 0x7F and all non-ASCII characters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Some, but not all, languages/libraries do this for you.&amp;nbsp;For example, in C#, using Json.NET/JsonTextWriter, that would look like:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;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");&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or, using Json.NET/JsonConvert:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;var serializerSettings = new JsonSerializerSettings();
serializerSettings.StringEscapeHandling = StringEscapeHandling.EscapeNonAscii;

var result = JsonConvert.SerializeObject(..., serializerSettings);
result = result.Replace("\x7f", "\\u007f");&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 May 2017 19:39:14 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Accented-characters-in-file-name/m-p/222771#M11934</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-05-24T19:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: Accented characters in file name</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Accented-characters-in-file-name/m-p/222855#M11948</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/10"&gt;@Greg-DB&lt;/a&gt;&amp;nbsp;, it is working absolutely fine.&lt;/P&gt;</description>
      <pubDate>Thu, 25 May 2017 11:55:00 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Accented-characters-in-file-name/m-p/222855#M11948</guid>
      <dc:creator>anildbest83</dc:creator>
      <dc:date>2017-05-25T11:55:00Z</dc:date>
    </item>
  </channel>
</rss>

