c# string char 0x85 (ellipsis?) -
my c# program receives string data (via windows message queue) includes char-133 in string.
is valid value in c#?
for example, if this:
string x = "a" + (char)133 + "b"; // 133 = 0x85 i can see string x has length 3, in visual studio debugger can see x = "ab".
if following, "ellipsis" character (which think 133 supposed program delivers it):
string y = "a" + (char)8230 + "b"; // 8230 = 0x2026 thanks pointers.
in string there no "invalid" value char. there "invalid unicode code points", string can contain them without problems, because string "stupid container" (but note string methods "more intelligent" , don't invalid code points... skip them/replace them substitution character)
now... "visualizers" (modules/functions/methods have "show" string) have limitations , can't show characters (even valid ones)... classsical example zalgo , zalgo. problem, problem :-)
to make example, in windows there @ least 4 "official" api write text screen: gdi, gdi+, uniscribe, directwrite. , many programs (games primarily) use freetype library alternative... each 1 of these libraries compatible parts of unicode.
i'll add character creates problems (0x85) called nel or next line. control character, not should "shown" , has complex , funny story, explain why shown ellipsis:
the code nel has been used ellipsis ('…') character in windows-1252.
for instance:
yaml[8] no longer recognizes them special, in order compatible json.
ecmascript[9] accepts ls , ps line breaks, considers u+0085 (nel) white space, not line break.
microsoft windows 2000 not treat of nel, ls or ps line-break in default text editor notepad
on linux, popular editor, gedit, treats ls , ps newlines not nel.
Comments
Post a Comment