logoalt Hacker News

WalterBrightyesterday at 9:32 PM3 repliesview on HN

Please explain why an invisible zero width "character" is necessary.


Replies

kriortoday at 12:53 AM

To mark linewrapping-breakpoints in strings.

show 1 reply
ted_dunningtoday at 12:26 AM

To prevent ligatures from forming when you need that.

show 1 reply
slimtoday at 12:24 AM

if 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.

show 1 reply