How does Zalgo text work?

前端 未结 2 1706
野的像风
野的像风 2020-11-22 10:52

I\'ve seen weirdly formatted text called Zalgo like below written on various forums. It\'s kind of annoying to look at, but it really bothers me because it undermines my not

2条回答
  •  执念已碎
    2020-11-22 11:15

    Zalgo text works because of combining characters. These are special characters that allow to modify character that comes before.

    enter image description here

    OR

    y + ̆ = y̆ which actually is

    y + ̆ = y̆
    

    Since you can stack them one atop the other you can produce the following:


    y̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆

    which actually is:

    y̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆
    

    The same goes for putting stuff underneath:


    y̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆



    that in fact is:

    y̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆
    

    In Unicode, the main block of combining diacritics for European languages and the International Phonetic Alphabet is U+0300–U+036F.

    More about it here

    To produce a list of combining diacritical marks you can use the following script (since links keep on dying)

    for(var i=768; i<879; i++){console.log(new DOMParser().parseFromString("&#"+i+";", "text/html").documentElement.textContent +"  "+"&#"+i+";");}

    Also check em out



    Mͣͭͣ̾ Vͣͥͭ͛ͤͮͥͨͥͧ̾

提交回复
热议问题