-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not all emojis can be represented as fixed 32 bit values #475
Comments
@garthvh that's a text message, not a waypoint. If you look at the payload of that message ( If you create a waypoint using that emoji it won't work properly as it consists of multiple unicode codepoints, since the android app for example only uses the first codepoint, the black flag (🏴): Which makes sense as you won't be able to fit these three characters in a 32 bit value. |
I'm not sure how desirable it is to support zero-width joiner emoji for waypoint icons like this; in theory those values could get pretty long (even just in the "recommended sequences" list the Unicode consortium puts out, some are as long as 8 code points, from what I found, and I would not be surprised if there are longer ones supported some places). The example pirate flag is already 4, when correctly encoded, since it needs the zero-width joiner and a variation selector. Maybe it's possible to leave some things like that off and compute a correct value, though I wouldn't necessarily count on it. No idea how much headroom we have in these messages right now/how much we'd want to allow. The apps should probably at least be validating that waypoint icons are in fact within whatever limit is applicable (currently, one Unicode codepoint within the right ranges, presumably) |
@ianmcorvidae Yes, I think that does make sense! In that case it's probably good to update the protobuf documentation for those fields as well to include that supporting a single codepoint for emojis is a design decision. |
Noticed that in Waypoint and the Data messages emojis are represented using fixed 32 bit values:
protobufs/meshtastic/mesh.proto
Lines 778 to 781 in dea3a82
protobufs/meshtastic/mesh.proto
Lines 731 to 735 in dea3a82
Noticed in the Android app that for waypoints some emojis don't work, or show different icons. For example, the pirate flag emoji just shows as a black flag on the map.
The text was updated successfully, but these errors were encountered: