Zalgo文本如何工作? [英] How does Zalgo text work?

查看:82
本文介绍了Zalgo文本如何工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在各种论坛上看到了如下所示的名为Zalgo的奇怪格式文本。这看起来有些恼人,但它真的让我困扰,因为它破坏了我对角色应该是什么的概念。我的理解是,角色应该横过一条线并保持在某个容器内。显然Zalgo文本是垂直移动的,似乎并不局限于任何空间。

这是Unicode中的一个缺陷/漏洞/攻击/黑客攻击吗?这些具有怪异属性的个人角色? 什么? 这里发生了什么?




点击



如何̸̤͓̞̫ͩͩ͑̋ͮͥͦ̊Z̆̊͊҉҉̠̦̩͕ą̟̹͈̺̹̋̅ͯĺ̡̘̹̻̩̩͋͘g̪͚͗ͬ͒o̢̖͇̬͍͇͓̔͋͊̓ ̢͈͙ͣ̏̿͐ͯ͠t̛͓̖̻ͤ̈ͣ͝e͋̄ͬ̽͜҉͚̭͇x͎̬̠͇̌ͤ̓̓͐͐͋͡ţ̗̹̝̮̗̩̳̄̌ͧͩ̾̕͢w͎̭̤͍͇̰̄͗ͭ͗ͮ̐o̢̯̻̰̼͕̾ͣͬ̽̔̍͟r̢̪͙͍̠ǩ̵̶̗̮̮ͪ?̙͉̥̬͙̟̮͕ͤ̌͗ͩ̕͡
结果,
结果,
结果



解决方案

文本使用组合字符,也称为组合标记。请参阅 在Unicode标准中组合字符的第2.11节在Unicode中,字符渲染不使用简单的字符单元格模型,其中每个字形符合给定高度的框。合并标记可以在基本字符的上方,下方或内部呈现

因此,您可以轻松构建一个由基本字符和合并以上标记组成的字符序列,假定渲染软件符合Unicode渲染模型,可以达到任何期望的视觉高度。这样的顺序当然没有意义,甚至猴子也可以生产它(例如,给一个带有合适驱动程序的键盘)。

你可以混合使用合并以上和合并以下商标。



问题中的示例文本以:


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

Is this a bug/flaw/exploit/hack in 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̢̪͙͍̠̀ͅǩ̵̶̗̮̮ͪ́?̙͉̥̬͙̟̮͕ͤ̌͗ͩ̕͡


解决方案

The text uses combining characters, also known as combining marks. See section 2.11 of Combining Characters in the Unicode Standard (PDF).

In Unicode, character rendering does not use a simple character cell model where each glyph fits into a box with given height. 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. Such a sequence has no meaning of course, and even a monkey could produce it (e.g., given a keyboard with suitable driver).

And you can mix "combining above" and "combining below" marks.

The sample text in the question starts with:

这篇关于Zalgo文本如何工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆