Last active
June 1, 2025 15:44
-
-
Save creationix/d45b0669e323175d8a705d5e489e3d44 to your computer and use it in GitHub Desktop.
This is a base 80 encoding that uses the 40 characters (upper and lower case) of the deseret alphabet invented by pioneers in the mid 1800s. It's not a very useful encoding since it's less efficient than base-16. But it is a pretty fun unicode test since these are high enough in the unicode space to require surrogate pairs in JavaScript.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ๐๐ฎ๐ ๐ฎ๐ ๐ฉ ๐บ๐ฉ๐ 80 ๐ฏ๐๐ฟ๐ฌ๐ผ๐ฎ๐ ๐๐ฐ๐ป ๐ฒ๐ ๐ฒ๐ ๐ 40 ๐ฟ๐ฐ๐๐ฎ๐ฟ๐ป๐ฒ๐๐ (๐ฒ๐น๐ฒ๐ ๐ฐ๐๐ผ ๐๐ต๐ฒ๐ ๐ฟ๐ฉ๐ ) | |
| // ๐ฒ๐ ๐ ๐ผ๐ฏ๐ ๐จ๐๐ฏ๐ป ๐ฐ๐๐๐ฐ๐บ๐ฏ๐ป ๐ฎ๐๐๐ฏ๐๐ป๐ฒ๐ผ ๐บ๐ด ๐๐๐ฎ๐๐ฒ๐ ๐๐ฒ๐ ๐ฎ๐ ๐ ๐๐ฎ๐ผ 1800๐ฏ๐ . | |
| // ๐๐ป ๐ฎ๐ ๐๐ช๐ป ๐ฉ ๐๐ฏ๐๐จ ๐ท๐ญ๐ ๐๐ฒ๐ ๐ฏ๐๐ฟ๐ฌ๐ผ๐ฎ๐ ๐ ๐ฎ๐๐ ๐ฎ๐ป ๐ฎ๐ ๐ฒ๐บ๐ต๐ป ๐ฐ๐ ๐ฎ๐๐ฎ๐๐ฒ๐๐ป ๐ฐ๐ ๐บ๐ฉ๐ | |
| // 16. ๐๐ฒ๐ป ๐ฎ๐ป ๐ฎ๐ ๐ฉ ๐น๐๐ฎ๐ป๐จ ๐๐ฒ๐ unicode ๐ป๐ฏ๐ ๐ป ๐ ๐ฎ๐๐ ๐๐จ๐ ๐ช๐ ๐ธ๐ด ๐ฎ๐๐ฒ๐ ๐ฎ๐ ๐ | |
| // unicode ๐ ๐น๐ฉ ๐ป๐ญ ๐๐ฎ๐ฟ๐ถ๐ด๐ฒ๐ ๐ ๐ฒ๐๐ฒ๐๐ฉ๐ป ๐น๐ฏ๐ ๐ฎ๐ ๐๐ช๐๐ฒ๐๐ฟ๐๐ฎ๐น๐ป. | |
| let ๐๐ฏ๐ ๐จ๐๐ฏ๐ป = '๐๐๐๐๐๐ ๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐ ๐ก๐ข๐ฃ๐ค๐ฅ๐ฆ๐ง' + | |
| '๐จ๐ฉ๐ช๐ซ๐ฌ๐ญ๐ฎ๐ฏ๐ฐ๐ฑ๐ฒ๐ณ๐ด๐ต๐ถ๐ท๐ธ๐น๐บ๐ป๐ผ๐ฝ๐พ๐ฟ๐๐๐๐๐๐ ๐๐๐๐๐๐๐๐๐๐'; | |
| export function ๐๐ฉ๐ ๐๐จ(๐ค๐ฒ๐๐บ๐ฒ๐) { | |
| let ๐๐ป๐๐ฎ๐ = ''; | |
| while (๐ค๐ฒ๐๐บ๐ฒ๐) { | |
| let i = (๐ค๐ฒ๐๐บ๐ฒ๐ % 80) << 1; | |
| ๐๐ป๐๐ฎ๐ += ๐๐ฏ๐ ๐จ๐๐ฏ๐ป[i] + ๐๐ฏ๐ ๐จ๐๐ฏ๐ป[i + 1]; | |
| ๐ค๐ฒ๐๐บ๐ฒ๐ = (๐ค๐ฒ๐๐บ๐ฒ๐ / 80) >>> 0; | |
| } | |
| return ๐๐ป๐๐ฎ๐; | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Wikipedia also had links to some great fonts for deseret. https://en.wikipedia.org/wiki/Help:Multilingual_support#Deseret