Skip to content

allow users to decode unicode escaped texts#41

Merged
colinta merged 1 commit intocolinta:masterfrom
aosaimy:master
Jan 8, 2020
Merged

allow users to decode unicode escaped texts#41
colinta merged 1 commit intocolinta:masterfrom
aosaimy:master

Conversation

@aosaimy
Copy link
Contributor

@aosaimy aosaimy commented Jan 7, 2020

Decoding strings like \uXXXX to normal Unicode text.
See this question:
SO questopm

@colinta
Copy link
Owner

colinta commented Jan 7, 2020

This looks great, though I would expect the command to actually be UnicodeUnescapeCommand - "escaping" unicode should convert the unicode symbols to \xxxx and unescaping should convert them back into text. What do you think of this change?

@colinta
Copy link
Owner

colinta commented Jan 8, 2020

I tested this using the text \u0e4f\u032f\u0361\u0e4f and it had no effect. What is the expected behavior or test case for this plugin?

@colinta
Copy link
Owner

colinta commented Jan 8, 2020

Oh, I see, it turns unicode characters into their escaped version – this is unfortunately a language-specific syntax (right now it's outputting in Python), but better than nothing.

It's very similar to this package: https://packagecontrol.io/packages/Unicode%20Escape

In the future it would be nice to detect the language and output the appropriate string, but like I said I think this works. Thanks!

@colinta colinta merged commit d3e1996 into colinta:master Jan 8, 2020
@colinta
Copy link
Owner

colinta commented Jan 8, 2020

Available in 2.4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants