-
Notifications
You must be signed in to change notification settings - Fork 3
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
Invalid rune provided: π #7
Comments
Please provide more info about what you try to do.
|
Sure. I'm running in the browser (Firefox) using browserify. When I run this command: It an error "Expected more than 4 emojis" When I run this command: ecoji.decode("πππππ") I get: Error: Invalid rune provided: π |
Do we know why this would be happening? lol. The unicode hex converter converts it to 1F004. The behavior also happens in node, server-side. |
@nival999 @projectoblio Please check now I've changed an error "Expected more than 4 emojis". |
But I only obtained the rune character by running emoji.encode in this library. So how could the library possibly be outputting a rune character after encoding if it can't decode it? I couldn't figure this out looking at the source. But this could be a major issue with the lib depending in the use case. |
As @nival999 mentioned in #7 (comment) the issue is caused by binary data encoding. |
^ Thanks, but I think this is the comment you meant to link to: #6 (comment) |
As well as comment from #7 (comment)
|
If the problem is with Binary data, then it makes no sense to have this line inside Ecoji.ts:
Why not allow the user to specify the input encoding, like @nival999 said? Defaulting to a non-functioning parameter makes no sense. This lib is a lot less useful if you require users to do that. I will try submitting a PR, sorry if this comment came off as negative |
If I leave |
Can you help me write a decodeType function for hex? I can't figure out how to make the test work: |
@projectoblio |
I keep getting the error "Invalid rune provided", but only for π... Any idea how to fix this?
Also, separate issue quick fix, I am using binary data now after reading the issue about it, but it should be an option to set the encoding type for that part. There's no reason it should by default only decode binary data.... There should be a pass-inargument for that for both decode and encode. I tried to make a fork which implemented it but weirdly couldnt load the library any longer. So I ended up just converting all my data to binary data (difficult to find functions for it since Javascript didn't support binary data at all until only a few years ago).
The text was updated successfully, but these errors were encountered: