<p dir="auto">Was working on a <code class="notranslate">removeDiacritics()</code> helper for <code class="notranslate">deno_std</code> and it appears that Deno is not properly handling <code class="notranslate">string.normalize()</code>.<br>
<strong>env</strong>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="deno: 0.3.2
v8: 7.4.238
typescript: 3.2.1"><pre class="notranslate"><code class="notranslate">deno: 0.3.2
v8: 7.4.238
typescript: 3.2.1
</code></pre></div>
<p dir="auto"><strong>Example</strong>:<br>
strTest.ts</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="let input = &quot;éèñëàäáüúùìíîïæç&quot;;
console.log(input.normalize(&quot;NFD&quot;).replace(/[\u0300-\u036f]/g, &quot;&quot;));"><pre class="notranslate"><span class="pl-k">let</span> <span class="pl-s1">input</span> <span class="pl-c1">=</span> <span class="pl-s">"éèñëàäáüúùìíîïæç"</span><span class="pl-kos">;</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">input</span><span class="pl-kos">.</span><span class="pl-en">normalize</span><span class="pl-kos">(</span><span class="pl-s">"NFD"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">replace</span><span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span><span class="pl-kos">[</span><span class="pl-cce">\u</span>0300-<span class="pl-cce">\u</span>036f<span class="pl-kos">]</span><span class="pl-c1">/</span>g</span><span class="pl-kos">,</span> <span class="pl-s">""</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="tsc strTest.ts -target esnext | node strTest.js // output: eeneaaauuuiiiiæc
deno strTest.ts // output: éèñëàäáüúùìíîïæç"><pre class="notranslate"><code class="notranslate">tsc strTest.ts -target esnext | node strTest.js // output: eeneaaauuuiiiiæc
deno strTest.ts // output: éèñëàäáüúùìíîïæç
</code></pre></div>
<p dir="auto">ref: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize" rel="nofollow">https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize</a></p>
<p dir="auto">As seen in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="422116599" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/1952" data-hovercard-type="issue" data-hovercard-url="/denoland/deno/issues/1952/hovercard" href="https://github.com/denoland/deno/issues/1952">#1952</a> / <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="405562913" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/1636" data-hovercard-type="issue" data-hovercard-url="/denoland/deno/issues/1636/hovercard" href="https://github.com/denoland/deno/issues/1636">#1636</a> ICU needs to be added in Deno build.</p>
<p dir="auto">Switching this flag to true maybe: <a href="https://github.com/denoland/deno/blob/master/.gn#L50">https://github.com/denoland/deno/blob/master/.gn#L50</a> ?</p>
<p dir="auto">ref: <a href="https://v8.dev/docs/i18n" rel="nofollow">https://v8.dev/docs/i18n</a></p>