question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

String type: "printable Unicode characters" and follow-on problems

See original GitHub issue

Previous 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 the data 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 as String.

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:closed
  • Created 4 years ago
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
duglincommented, Aug 14, 2019

@cneijenhuis will #485 address your concern?

1reaction
duglincommented, Aug 14, 2019
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found