Merge pull request #28 from emojisum/verbiage_for_combinations

emoji: update spec for combination unicode
This commit is contained in:
Vincent Batts 2018-10-16 15:38:38 -04:00 committed by GitHub
commit e97db24c33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 5 deletions

View File

@ -85,7 +85,7 @@ import (
func main() {
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)) {
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
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
@ -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.
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
* 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.",
"emojiwords": [
[":+1:", "U+1F44D"],

View File

@ -12,7 +12,7 @@ This ordered list of emojiwords is the conventional order for the practice of co
### Version
draft+2
draft+3
### List
* `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() {
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.",
Version: "draft+2",
Version: "draft+3",
EmojiWords: []Words{
Words{ ":+1:","U+1F44D",
},