1
0
Fork 0
mirror of https://github.com/emojisum/emojisum.git synced 2024-11-16 04:38:37 +00:00

emoji: update spec for combination unicode

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2018-10-16 15:27:44 -04:00
parent 4dc49af65b
commit a1c34a4637
Signed by: vbatts
GPG key ID: 10937E57733F1362
5 changed files with 16 additions and 5 deletions

View file

@ -85,7 +85,7 @@ import (
func main() { func main() {
for i := 0; i < 255; i++ { for i := 0; i < 255; i++ {
fmt.Printf("%d :\n", i) fmt.Printf("%d (%2.2x):\n", i, i)
for _, word := range emoji.Map(byte(i)) { for _, word := range emoji.Map(byte(i)) {
fmt.Printf(" - %s\n", emoji.CodepointToUnicode(word)) fmt.Printf(" - %s\n", emoji.CodepointToUnicode(word))
} }

View file

@ -50,7 +50,7 @@ The purpose of this practice is provide simplified way to convey [checksums](htt
### Intended Audience ### Intended Audience
This is intended for use by implementors of software to convey checksums or validate conveyed checksums. This is intended for use by implementors of software to convey checksums or validate conveyed checksums or unique fingerprints.
## Details ## Details
@ -60,6 +60,17 @@ Most checksums convey in a hexadecimal notation, there showing a par of case-ins
Having a mapping of 256 emojis this thereby reduces the number of characters (or emojis) needed to convey the checksum. Having a mapping of 256 emojis this thereby reduces the number of characters (or emojis) needed to convey the checksum.
In example, a [SHA1](https://en.wikipedia.org/wiki/SHA-1) checksum is 40 hexadecimal characters long, whereas an SHA1-emojisum is only 20 emojis. In example, a [SHA1](https://en.wikipedia.org/wiki/SHA-1) checksum is 40 hexadecimal characters long, whereas an SHA1-emojisum is only 20 emojis.
### The emojimap
In the common document [`emojimap.json`](./emojimap.json) there is an ordered list of arrays.
Each array contains a set of strings that are either a human readable word or the human readable unicode point.
For example, byte `0xe8` (position 232) is `[":nauseated_face:", "U+1F922"]`.
For more complex and visually similar emoji there are times that the unicode is a combination.
This is the case for flags and people.
For example, byte `0xd9` (position 217) includes `:surfer:`, `U+1F3C4`, and `U+1F3C4U+200DU+2642U+FEOF`.
When there is a combination, implementations MUST split on the "`U+`".
## References ## References
* Unicode Technical Report #51 - http://www.unicode.org/reports/tr51/ * Unicode Technical Report #51 - http://www.unicode.org/reports/tr51/

View file

@ -1,5 +1,5 @@
{ {
"version": "draft+2", "version": "draft+3",
"description": "This ordered list of emojiwords is the conventional order for the practice of conveying checksums with emoji. Each position provides the alternative for resolving the desired emoji.", "description": "This ordered list of emojiwords is the conventional order for the practice of conveying checksums with emoji. Each position provides the alternative for resolving the desired emoji.",
"emojiwords": [ "emojiwords": [
[":+1:", "U+1F44D"], [":+1:", "U+1F44D"],

View file

@ -12,7 +12,7 @@ This ordered list of emojiwords is the conventional order for the practice of co
### Version ### Version
draft+2 draft+3
### List ### List
* `0` -- :+1: `:+1:` [U+1F44D](http://www.unicode.org/emoji/charts/full-emoji-list.html#1F44D) * `0` -- :+1: `:+1:` [U+1F44D](http://www.unicode.org/emoji/charts/full-emoji-list.html#1F44D)

View file

@ -6,7 +6,7 @@ package emoji
func init() { func init() {
mapGen = VersionedMap{ mapGen = VersionedMap{
Description: "This ordered list of emojiwords is the conventional order for the practice of conveying checksums with emoji. Each position provides the alternative for resolving the desired emoji.", Description: "This ordered list of emojiwords is the conventional order for the practice of conveying checksums with emoji. Each position provides the alternative for resolving the desired emoji.",
Version: "draft+2", Version: "draft+3",
EmojiWords: []Words{ EmojiWords: []Words{
Words{ ":+1:","U+1F44D", Words{ ":+1:","U+1F44D",
}, },