Reputation: 4655
To keep code clean across different platforms (and due to a bug where one can't use Unicode escape literals like 😁
in XML files), instead of putting actual "non-normal" Unicode characters like U+1F601 (š), I usually use \u
-escaped UTF-16 surrogate pairs like \ud83d\ude01
.
However, when I select and copy String literals containing these escapes from a Java source code file, they are converted to the actual character upon pasting. So when I copy and paste the text
String smile = "\ud83d\ude01";
to another location, it comes out as
String smile = "š";
How can I disable this behavior? I didn't find anything in the Settings; or I searched in the wrong place.
Upvotes: 2
Views: 933
Reputation: 642
I have not found an option that disables it when pasting; instead, I use the "Paste Simple" option to prevent the escaped Unicode from converting to the actual character.
On a Mac, the keyboard combination for "Paste Simple" is ā+alt+shift+V
Upvotes: 2