Escape or replace invisible or ambiguous characters when formatting strings
See original GitHub issueInvisible characters such as zero-width joiner and non-breaking space, as well as ambiguous characters like other kinds of spaces, combining characters et cetera should be escaped when strings are formatted.
http://graphemica.com/blocks/control-pictures should be used where the behavior of the original character is preserved. This probably only applies to linebreaks.
If a simple escape sequence exist it should be used. Else characters should be escaped using the \u
sequence.
When a string is formatted as a key it must not include linebreaks.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Using character escapes in markup and CSS - W3C
Character escapes are a way of writing a character in markup using only ASCII code points. They are useful if you are unable...
Read more >In R, How can I replace ambiguous characters in string with all ...
One way is to split the string, replace the ambiguous characters with their possible values, generate the possible combinations and paste ...
Read more >Writing Invisible XML grammars
Invisible XML reports ambiguous parses, not ambiguous grammars. It's also possible to write a grammar that has loops in it: seq: 's', seq;...
Read more >Power User Tips and Tricks - Word, Excel, Dreamweaver
"Find and replace text and other data in a Word document" ... To match these characters, prepend with the escape character \ ....
Read more >Link Format (The Org Manual)
Functions inserting links (see Handling Links) properly escape ambiguous characters. You only need to bother about the rules above when inserting directly, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’d be great if we could show byte differences when characters look the same, like in this example: https://github.com/avajs/ava/issues/2451
ANSI codes should also be escaped.