<?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: Problem with special charachters in Company name in Discuss Dropbox Developer &amp; API</title>
    <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Problem-with-special-charachters-in-Company-name/m-p/318503#M357</link>
    <description>&lt;P&gt;Hi, yeah thanks for your answer! Five minutes before leaving work yesterday I stumbled upon the String.prototype.normalize()-function and it very easily solved my problems!&lt;/P&gt;&lt;P&gt;For future reference and to anyone that might stumble upon this:&lt;/P&gt;&lt;P&gt;As I've understood it, while searching through sources, there are two ways to represent charachters such as å, ä, ö and similar in a unicode string. Either as one special charachter (e.g. 'ö' === '\u00f6' in JS) or as&amp;nbsp;a base charachter together with a combining diaeresis (e.g. 'ö' === 'o\u0308' in JS).&lt;/P&gt;&lt;P&gt;In javascript one can use &lt;A href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize" target="_self"&gt;String.prototype.normalize()&lt;/A&gt; to compare two strings even if the strings use different solutions to store charachters.&lt;/P&gt;&lt;P&gt;Please correct me if I'm wrong.&lt;/P&gt;</description>
    <pubDate>Tue, 18 Dec 2018 06:39:09 GMT</pubDate>
    <dc:creator>Adam B.</dc:creator>
    <dc:date>2018-12-18T06:39:09Z</dc:date>
    <item>
      <title>Problem with special charachters in Company name</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Problem-with-special-charachters-in-Company-name/m-p/318277#M351</link>
      <description>&lt;P&gt;I'm working on an internal production tool for our company. And for that I need to compare some local files inside the Dropbox folder with the files synced to Dropbox (to at least try to prevent som race conditions working with InDesign and the lock-files created by it).&lt;/P&gt;&lt;P&gt;And then I use the path info from ~/.dropbox/info.json to get at which path the team folder is mounted.&lt;/P&gt;&lt;P&gt;But I encounter a problem when using the path because there seems to be some differences between how Dropbox parses special characters and how macOS treats them.&lt;/P&gt;&lt;P&gt;In our case it's "ö" – parsed as "o\u0308" in info.json, but I'm guessing there might be some trouble with similar characters such as "å", "ä" or "ü". And if I want to distribute this to a larger crowd I have to account for this.&lt;/P&gt;&lt;P&gt;When I compare the the specific charachters retrieved using String.prototype.charCodeAt(), the difference get clear:&lt;/P&gt;&lt;P&gt;OS path: charCode 111&lt;BR /&gt;Dropbox path: charCode 246&lt;/P&gt;&lt;P&gt;And in the file the name of our company is "Sjo\u0308fartstidningen".&lt;/P&gt;&lt;P&gt;Maybe it's Dropbox, or maybe this has something to do with how javascript parses "o\u0308", I don't now. I just did JSON.parse(content) after retrieving the content of info.json using fs.readFile(path, 'utf8').&amp;nbsp;Has anyone else encountered this? Does anyone know of a way to properly parse unicode charachters with Node? Or is there actually a difference between how Dropbox does this and how macOS does it?&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:05:27 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Problem-with-special-charachters-in-Company-name/m-p/318277#M351</guid>
      <dc:creator>Adam B.</dc:creator>
      <dc:date>2019-05-29T09:05:27Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with special charachters in Company name</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Problem-with-special-charachters-in-Company-name/m-p/318329#M352</link>
      <description>&lt;P&gt;Okey I've digged a bit deeper into this. It seems like Dropbox have interpreted the "ö" in "Sjöfartstidningen" (our company) as o + "¨" (well not really ¨ but a similar char) separateley. Which equals "o\u0308", instead I would expect "\u00f6".&lt;/P&gt;&lt;P&gt;I've got this from&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://www.branah.com/unicode-converter" target="_self"&gt;https://www.branah.com/unicode-converter&lt;/A&gt;&lt;/P&gt;&lt;P&gt;But this doesn't make me any smarter...&lt;/P&gt;</description>
      <pubDate>Mon, 17 Dec 2018 14:19:52 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Problem-with-special-charachters-in-Company-name/m-p/318329#M352</guid>
      <dc:creator>Adam B.</dc:creator>
      <dc:date>2018-12-17T14:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with special charachters in Company name</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Problem-with-special-charachters-in-Company-name/m-p/318405#M355</link>
      <description>&lt;P&gt;It sounds like the different strings you're trying to use have different &lt;A href="https://unicode.org/faq/normalization.html" target="_self"&gt;normalization forms&lt;/A&gt;, and so they aren't &lt;A href="https://en.wikipedia.org/wiki/Unicode_equivalence" target="_self"&gt;equivalent&lt;/A&gt;. You should probably normalize them before comparing them, such as &lt;A href="https://nodejs.org/en/docs/guides/working-with-different-filesystems/#comparing-different-unicode-forms" target="_self"&gt;covered here for Node.js&lt;/A&gt;.&amp;nbsp;Hope this helps!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Dec 2018 19:01:37 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Problem-with-special-charachters-in-Company-name/m-p/318405#M355</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2018-12-17T19:01:37Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with special charachters in Company name</title>
      <link>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Problem-with-special-charachters-in-Company-name/m-p/318503#M357</link>
      <description>&lt;P&gt;Hi, yeah thanks for your answer! Five minutes before leaving work yesterday I stumbled upon the String.prototype.normalize()-function and it very easily solved my problems!&lt;/P&gt;&lt;P&gt;For future reference and to anyone that might stumble upon this:&lt;/P&gt;&lt;P&gt;As I've understood it, while searching through sources, there are two ways to represent charachters such as å, ä, ö and similar in a unicode string. Either as one special charachter (e.g. 'ö' === '\u00f6' in JS) or as&amp;nbsp;a base charachter together with a combining diaeresis (e.g. 'ö' === 'o\u0308' in JS).&lt;/P&gt;&lt;P&gt;In javascript one can use &lt;A href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize" target="_self"&gt;String.prototype.normalize()&lt;/A&gt; to compare two strings even if the strings use different solutions to store charachters.&lt;/P&gt;&lt;P&gt;Please correct me if I'm wrong.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Dec 2018 06:39:09 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Discuss-Dropbox-Developer-API/Problem-with-special-charachters-in-Company-name/m-p/318503#M357</guid>
      <dc:creator>Adam B.</dc:creator>
      <dc:date>2018-12-18T06:39:09Z</dc:date>
    </item>
  </channel>
</rss>

