telosnetwork / telos-keycatjs

MIT License
1 stars 2 forks source link

Cannot send non-latin characters (emojis/chineese/arabic) #2

Open poplexity opened 4 years ago

poplexity commented 4 years ago

https://github.com/telosnetwork/telos-keycatjs/blob/1c268ec38ebb5a15d15bee160e225eb389bea498/src/index.ts#L107

For instance, an emoji in a memo or in a profile status, cannot get these transactions to work. It gives error "Error: Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range."

One possible solution would be to use the ESR protocol which will definitely safely encode/decode action/transaction data. Or just find another strategy to encode/decode into a url safe string that will allow emojis and chinese/arabic characters.

poplexity commented 4 years ago

Also of course need to match the decoding on the keycat repo side where it pulls this data back out of the URL.