4 ms·
You're talking about a subset of ASCII then. Unicode is supposed to support different languages and advanced typography, for which those characters are necessar
by abujazar 7mo ago
You're talking about a subset of ASCII then. Unicode is supposed to support different languages and advanced typography, for which those characters are necessary. You can't write e.g. Arabic or Hebrew without those "unnecessary" invisible characters.
- WalterBright 7mo agoPlease explain why an invisible zero width "character" is necessary.
- slim 7mo agoif you write كلب which is an arabic word written right to left in the middle of an english sentence, you want to preserve the order of the characters in the stream for computer processing purposes. meaning the chararacter ك must come before the ل and after the e and the space with respect to the memory layout. whereas when displayed, it must be inverted to be legible. the solution is to have an invisible character that indicates a switch in text direction. if you were wondering, the situation where you want to write text in a foreign language within your text is very common outside english speaking countries.
- WalterBright 7mo agoLook I'm writing sdrawkcab (amazingly, I did it without using Unicode!). Layout is the job of your text formatting program. It's easy to fix a text editor to support right-to-left text entry. The switch in text direction has resulted in malicious code injection attacks, as the reversed text becomes invisible. I had to change my compiler to reject those Unicode characters for that reason. It can be used in other cases to have hidden, malicious text. Have you checked your SQL code for invisible backwards text that injects malware?
- estebank 7mo ago> Look I'm writing sdrawkcab How would that work with Text-To-Speech output?
- WalterBright 7mo agoGood question! Two possibilities: 1. Tell the TTS program that the text is RTOL. 2. If the TTS program can speak Arabic, it can detect RTOL Arabic text. The only purpose for RTOL English I can think of is to insert hidden text for malicious purposes.
- slim 7mo agohow do you search for strings in the text ? how do you search for half the word ? as you do in autocomplete or in that search box in your browser
- slim 7mo agoI don't know what "sdrawkcab" means. I'm not a native english speaker, and nothing indicates that it's not a real word or that it is spelled backwards
- ted_dunning 7mo agoTo prevent ligatures from forming when you need that.
- WalterBright 7mo agoThat's the job of a typesetting language.
- krior 7mo agoTo mark linewrapping-breakpoints in strings.
- WalterBright 7mo agoLeave typesetting to a proper typesetting language, like Latex.
- krior 7mo agoAnd how do you call into the typesetting language? Slugging around byte-arrays?