Unicode“退格键”的目的是什么? U+0008?

发布于 2024-12-21 12:57:01 字数 58 浏览 8 评论 0原文

Unicode 字符“BACKSPACE”(U+0008) 在编程中的用途是什么?它可以用于哪些应用?

What is the purpose of the Unicode Character 'BACKSPACE' (U+0008) in programming? What applications can it be used for?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

暗地喜欢 2024-12-28 12:57:01

在输出到终端时,它通常将光标向左移动一个位置(取决于设置)。输入时,它通常会删除最后输入的字符(取决于应用程序和终端设置),尽管 DEL / DELETE 字符也用于此目的。通常可以通过按 BackspaceControl-H 输入它。

请注意,删除字符的操作仅发生在显示器上,而不是在内存中。正在运行的程序中的字符串可以包含几乎任何字符序列(可能取决于语言),包括退格键。在这种情况下,它通常只是另一个角色。例如,在 C 中 strlen("abcd\b") 是 5,而不是 3。

在 C 和许多其他语言中,它在程序源代码中表示为 '\b'.有时显示为 ^H

无论是否表示为 Unicode,所有这些都适用。退格字符是大多数或所有字符集所共有的:ASCII、Latin-1、各种 Unicode 表示形式——甚至 EBCDIC 也有退格字符(但具有不同的代码)。

On output to a terminal, it typically moves the cursor one position to the left (depending on settings). On input, it typically erases the last entered character (depending on the application and terminal settings), though the DEL / DELETE character is also used for this purpose. Typically it can be entered by pressing Backspace or Control-H

Note that its action of deleting characters occurs only on a display, not in memory. A string within a running program can contain just about any sequence of characters (depending perhaps on the language), including backspace. In that context, it's generally just another character. For example, in C strlen("abcd\b") is 5, not 3.

In C and a number of other languages, it's represented in program source as '\b'. It's sometimes displayed as ^H.

All this applies whether it's represented as Unicode or not. The backspace character is common to most or all character sets: ASCII, Latin-1, the various Unicode representations -- even EBCDIC has a backspace character (but with a different code).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文