String type: "printable Unicode characters" and follow-on problems
See original GitHub issuePrevious discussion started by @evankanderson here: https://github.com/cloudevents/spec/pull/456#issuecomment-507860941 and in the following comments. Also, here: https://github.com/cloudevents/spec/pull/471/files#r312744230 and here: https://github.com/cloudevents/spec/pull/482#issuecomment-520437625
The String
type currently only allows “printable” Unicode characters.
There are multiple problems:
- As @evankanderson has pointed out, while “printable” is defined for ASCII, it isn’t clear what it means in Unicode.
- One may assume that space is not “printable” (but per ASCII, it is)
- We can’t use
String
for thedata
attribute. The most obvious reason is that line breaks can’t be used, which is an issue for plain text, but also if we want to model JSON, XML or CSV asString
.
String
is used in three places:
- As a key for
Map
. The “printable” requirement makes sense (and may be even to weak?) - As a value in regular attributes. The “printable” requirement makes sense, or we’d have to rework our HTTP transport a bit (as headers are terminated by a line break).
- As a value in
data
. The requirement is too restrictive.
Issue Analytics
- State:
- Created 4 years ago
- Comments:15 (6 by maintainers)
Top Results From Across the Web
Unicode is Kind of Insane - Ben Frederickson
Another issue that Combining Characters cause is that comparing two Unicode strings to see if they are equal isn't as simple as comparing...
Read more >How can I replace non-printable Unicode characters in Java?
However, neither works for Unicode strings. Does anyone has a good way to remove non-printable characters from a unicode string? java · string...
Read more >Using Unicode Characters in Power BI - BI Insight
In this post I explain how you can use Power BI as a tool to generate almost all valid Unicode characters in Power...
Read more >Display Problems - Unicode
Install fonts that cover the characters you need; Configure your browser to use them. Fonts. There are few full Unicode fonts for fixed-width...
Read more >Car in text characters - Para Erboristeria Ruocco
How to Insert a Symbol in WordInsert a Special Character in WordCheck out our new ... To print one, press the ALT key...
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
@cneijenhuis will #485 address your concern?
Created: https://github.com/cloudevents/spec/pull/484