We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 11e9d98 + 0a7ded5 commit 9ff9aaeCopy full SHA for 9ff9aae
1-js/05-data-types/03-string/article.md
@@ -631,10 +631,12 @@ This provides great flexibility, but also an interesting problem: two characters
631
For instance:
632
633
```js run
634
-alert( 'S\u0307\u0323' ); // Ṩ, S + dot above + dot below
635
-alert( 'S\u0323\u0307' ); // Ṩ, S + dot below + dot above
+let s1 ='S\u0307\u0323'; // Ṩ, S + dot above + dot below
+let s2 ='S\u0323\u0307'; // Ṩ, S + dot below + dot above
636
637
-alert( 'S\u0307\u0323' == 'S\u0323\u0307' ); // false, different characters (?!)
+alert( `s1: ${s1}, s2: ${s2}` );
638
+
639
+alert( s1 == s2 ); // false though the characters look identical (?!)
640
```
641
642
To solve this, there exists a "unicode normalization" algorithm that brings each string to the single "normal" form.
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments