1/7/2024 0 Comments Unicode char ref wiki![]() Is a zero-width space printable? When is a hyphenation point printable? Are there characters whose printability depends on their position in a word or on what characters are adjacent to them? Is a combining-character always printable?ĪSCII printable character range is \u0020 - \u007f In particular whether a particular "character" is printable is not always obvious. The more you learn about Unicode, the more you realise how unexpectedly diverse and unfathomably weird human writing systems are. It is almost as if there are some depths the wizards at Unicode dare not plumb. Notice that it says "defined as printable by Go" not by "defined as printable by Unicode". That the only spacing character is ASCII space, U+0020. This categorization is the same as IsGraphic except The ASCII space character, from categories L, M, N, P, S and the ASCII SuchĬharacters include letters, marks, numbers, punctuation, symbols, and IsPrint reports whether the rune is defined as printable by Go. SuchĬharacters include letters, marks, numbers, punctuation, symbols, and spaces, IsGraphic reports whether the rune is defined as a Graphic by Unicode. Some programming languages assist with this problem.įor example, the Go language has a "unicode" package which provides many useful Unicode-related functions including these two: func IsGraphic(r rune) bool You must always remember that terms like "character" and "printable" are often difficult and have interesting edge-cases. The Major classes are Letter, Mark, Punctuation, Symbol, Separator, and Other.īy knowing the properties of your characters, you can decide whether you consider them printable in your particular context. One of these properties is "General Category" which has Major classes and subclasses. Unicode defines properties for characters. This is an old question, but it is still valid and I think there is more to usefully, but briefly, say on the subject than is covered by existing answers.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |