叠加文字?
快速文本处理问题。它不一定与编程有关,但这是我认为我应该去的最好的地方。
降分告诉我这里不欢迎这种问题。 (不过,我真的很喜欢我的一点点声誉。)
无论如何,如何对文本进行编码,以便两个字符在同一个字符空间中呈现?
注意:这是针对纯文本的——没有什么特别复杂的。
Quick text-processing question. It's not necessarily related to programming, but this is the best place I figured I should go.
Rate down to tell me this kind of question is not welcome here. (Though, I really like my one little reputation point.)
Anyways, how can I encode text so that two characters get rendered in the same charspace?
NOTE: this is for plain-text -- nothing particularly complex.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您能做的最好的事情就是在两者之间放置一个退格字符。然而,结果不太可能对您有用,这取决于使用什么软件来显示文本。最有可能的是退格键将被忽略或显示为某种通用的“不可用”字形。第二个最有可能的是第二个字符将完全删除第一个字符。你必须非常幸运才能让这两个角色在同一空间中一个一个地显示。
The best you can do is put a backspace character between the two. However the outcome isn't likely to be useful to you, it will depend on what software is being used to display the text. The most likely is that the backspace will be ignored or shown as some generic "unavailable" glyph. The second most likely is that the second character will completely erase the first. You'd have to be very lucky for the two characters to be displayed one over the other in the same space.
如果它是任何编辑器都可以处理的纯文本,据我所知你不能。即使您的文本以 Unicode 编码,我也不认为它提供 组合字符用于普通字母,但仅用于重音符号和旨在与其他字形组合的类似符号。
顺便说一句,我不确定 stackoverflow 是否适合此类内容,我会在 superuser.com 中看到更好的内容。
If it's plain text to be processed by any editor, as far as I know you can't. Even if your text is encoded in Unicode, I don't think it provides combining characters for normal letters, but just for accents and similar symbols which are intended to be combined with other glyphs.
BTW, I'm not sure that stackoverflow is the right place for this kind of stuff, I'd see it better in superuser.com.