Closed venusdrogon closed 1 year ago
'\b' only deletes when printing to a terminal (and not necessarily all terminals, though common *NIX shells and cmd.exe should work). If the output is going to a file (or anywhere else besides a terminal), it's going to insert the literal ASCII backspace character.
https://www.asciihex.com/character/control/8/0x08/bs-backspace
解密之后的字符串copy到编辑器里面包含‘backspace’的隐藏字符,如图:
而后端hub接收到数据后会转换为xml,他们不支持,导致报错
https://stackoverflow.com/questions/48568885/what-is-the-use-of-b-backspace4
Backspace is a control character that moves the cursor one character back in the console but doesn't delete it.
What's the reason for the backspace character, and how might it be used?
It was used historically in the ASCII world to print accented characters.
For example à could be produced using the three character sequence a Backspace ` (or, using the characters' hex values, 0x61 0x08 0x60).
Backspace key vs Backspace character
A lot of people confuse the two.