本文翻译自:How does Zalgo text work?
I've seen weirdly formatted text called Zalgo like below written on various forums. 我在各个论坛上都看到过奇怪的格式化文本Zalgo,如下所示。 It's kind of annoying to look at, but it really bothers me because it undermines my notion of what a character is supposed to be. 看起来很烦人,但它确实使我感到困扰,因为它破坏了我对角色应该是什么样的观念。 My understanding is that a character is supposed to move horizontally across a line and stay within a certain "container". 我的理解是,角色应该在一条线上水平移动并停留在某个“容器”内。 Obviously the Zalgo text is moving vertically and doesn't seem to be restricted to any space. 显然,Zalgo文本是垂直移动的,似乎不受任何空间限制。
Is this a bug/flaw/exploit/hack in Unicode? 这是Unicode中的错误/缺陷/漏洞利用/黑客吗? Are these individual characters with weird properties? 这些单个字符是否具有怪异的属性? "What" is happening here? “什么”在这里发生?
H̡̫̤̤̣͉̤ͭ̓̓̇͗̎̀ơ̯̗̱̘̮͒̄̀̈ͤ̀͡w͓̲͙͖̥͉̹͋ͬ̊ͦ̂̀̚ ͎͉͖̌ͯͅͅd̳̘̿̃̔̏ͣ͂̉̕ŏ̖̙͋ͤ̊͗̓͟͜e͈͕̯̮̙̣͓͌ͭ̍̐̃͒s͙͔̺͇̗̱̿̊̇͞ ̸̤͓̞̱̫ͩͩ͑̋̀ͮͥͦ̊Z̆̊͊҉҉̠̱̦̩͕ą̟̹͈̺̹̋̅ͯĺ̡̘̹̻̩̩͋͘g̪͚͗ͬ͒o̢̖͇̬͍͇͓̔͋͊̓ ̢͈͙͂ͣ̏̿͐͂ͯ͠t̛͓̖̻̲ͤ̈ͣ͝e͋̄ͬ̽͜҉͚̭͇ͅx͎̬̠͇̌ͤ̓̂̓͐͐́͋͡ț̗̹̝̄̌̀ͧͩ̕͢ ̮̗̩̳̱̾w͎̭̤͍͇̰̄͗ͭ̃͗ͮ̐o̢̯̻̰̼͕̾ͣͬ̽̔̍͟ͅr̢̪͙͍̠̀ͅǩ̵̶̗̮̮ͪ́?̙͉̥̬͙̟̮͕ͤ̌͗ͩ̕͡ ̡̫̤̤̣͉̤͎͉͖ͭ̓̓̇͗̎̀͋ͬ̌ͯͅͅ ̳̘̿̃̔̏ͣ͂̉̕ ̸͎͉͖̖̙̤͓̞̱̫̌ͯ̆͋ͤ͗̓̿͟͜ͅͅ ̸̤͓̞̱̫ ̸̤͓̞̱̫ ̸̤͓̞̱̫ ̸̤͓̞̱̫ ̛͓̖̻̲ͤ̈ͣ͝ ̛͓̖̻̲ͤ̈ͣ͝ ̛͓̖̻̲ͤ̈ͣ͝ ̛͓̖̻̲ͤ̈ͣ͝ ̛͓̖̻̲ͤ̈ͣ͝ ̛͓̖̻̲ͤ̈ͣ͝ ̵̶̵̶̵̶̛͓̖̻̲̗̮̮̗̮̮̗̮̮ͤ̈ͣ͝
#1楼
参考:https://stackoom.com/question/RbiW/Zalgo文字如何工作
#2楼
The text uses combining characters, also known as combining marks. 文本使用组合字符,也称为组合标记。 See section 2.11 of Combining Characters in the Unicode Standard (PDF). 请参阅Unicode标准 (PDF)中的组合字符 2.11节。
In Unicode, character rendering does not use a simple character cell model where each glyph fits into a box with given height. 在Unicode中,字符渲染不使用简单的字符单元模型,其中每个字形都适合具有给定高度的框。 Combining marks may be rendered above, below, or inside a base character 组合标记可以在基本字符的上方,下方或内部显示
So you can easily construct a character sequence, consisting of a base character and “combining above” marks, of any length, to reach any desired visual height, assuming that the rendering software conforms to the Unicode rendering model. 因此,只要渲染软件符合Unicode渲染模型,您就可以轻松构造一个字符序列,该字符序列由任意长度的基本字符和“上面的组合”标记组成,以达到任何所需的视觉高度。 Such a sequence has no meaning of course, and even a monkey could produce it (eg, given a keyboard with suitable driver). 这样的序列当然没有意义,甚至猴子也可以产生它(例如,给键盘一个合适的驱动器)。
And you can mix “combining above” and “combining below” marks. 您可以混合“在上方组合”和“在下方组合”标记。
The sample text in the question starts with: 问题中的示例文本以以下内容开头:
- LATIN CAPITAL LETTER H -
H
拉丁文大写字母H -H
- COMBINING LATIN SMALL LETTER T -
ͭ
组合ͭ
T -ͭ
- COMBINING GREEK KORONIS -
̓
结合希腊克朗斯 -̓
- COMBINING COMMA ABOVE -
̓
合并逗号 -̓
- COMBINING DOT ABOVE -
̇
上面结合点 -̇
#3楼
Zalgo text works because of combining characters. Zalgo文本之所以有效,是因为结合了字符。 These are special characters that allow to modify character that comes before. 这些是特殊字符,允许修改之前出现的字符。
OR 要么
y + ̆ = y̆ which actually is y +̆=y̆实际上是
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. 在Unicode中,将欧洲语言的变音符号和国际音标结合起来的主要步骤是U + 0300–U + 036F。
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ͣͥͭ͛ͤͮͥͨͥͧ̾ Mͣͭͣ̾Vͣͥͭ͛ͤͮͥͨͥͧ̾