We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Current encoder interprets Unicode emoji as spaces (giving [" "] as incorrect output)
[" "]
import x.json2 fn main() { assert json2.Any([ json2.Any('馃拃') ]).json_str().bytes() == '["馃拃"]'.bytes() }
Successful execution without errors
test.v:4: FAIL: fn main.main: assert x.json2.Any([x.json2.Any('馃拃')]).json_str().bytes() == '['馃拃']'.bytes() left value: x.json2.Any([x.json2.Any('馃拃')]).json_str().bytes() = [91, 34, 32, 34, 93] right value: '['馃拃']'.bytes() = [91, 34, 240, 159, 146, 128, 34, 93] V panic: Assertion failed... v hash: c0321c8 C:/Users/mclr/AppData/Local/Temp/v_0/test.12033367665732342971.tmp.c:8391: at _v_panic: Backtrace C:/Users/mclr/AppData/Local/Temp/v_0/test.12033367665732342971.tmp.c:18701: by main__main C:/Users/mclr/AppData/Local/Temp/v_0/test.12033367665732342971.tmp.c:18812: by wmain 0049f3f8 : by ??? 0049f55b : by ??? 7ffa3fd753e0 : by ???
Hint: Python json encodes it as ["\\ud83d\\udc80"]
json
["\\ud83d\\udc80"]
Used in discord.v button components
discord.v
V 0.4.3 ed754cf
Unrelated
Note
You can use the 馃憤 reaction to increase the issue's priority for developers.
Please note that only the 馃憤 reaction to the issue itself counts as a vote. Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered:
x.json2: fix encoding of 馃拃馃悎 etc emojis (fix vlang#20243)
c01a725
x.json2: fix encoding of 馃拃馃悎 etc emojis (fix #20243) (#20247)
944b955
spytheman
Successfully merging a pull request may close this issue.
Describe the bug
Current encoder interprets Unicode emoji as spaces (giving
[" "]
as incorrect output)Reproduction Steps
Expected Behavior
Successful execution without errors
Current Behavior
Possible Solution
Hint: Python
json
encodes it as["\\ud83d\\udc80"]
Additional Information/Context
Used in
discord.v
button componentsV version
V 0.4.3 ed754cf
Environment details (OS name and version, etc.)
Unrelated
Note
You can use the 馃憤 reaction to increase the issue's priority for developers.
Please note that only the 馃憤 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered: