Bugzilla – Bug 313306
Backspace character fails to work at the end of a string.
Last modified: 2007-09-15 21:24:46 UTC
---- Reported by lastfuture@lastfuture.de 2003-12-07 16:25:05 MST ---- Description of Problem: \b as the escape symbol for backspace does not work in a Console.WriteLine when being positioned in the end of the string. Steps to reproduce the problem: Console.WriteLine("Backspace\b"); Console.Write("Backspace\b"); Console.WriteLine(); Console.WriteLine("Backspace\b "); Actual Results: Backspace Backspac Backspac Expected Results: Backspac Backspac Backspac How often does this happen? Always Additional Information: It is not just cosmetical but can get nasty if for example output of one program has to be parsed by another program. The error is not mono specific, but also reproducable in .NET, thus probably being a specification bug. Not sure if it should be fixed, that would lose .NET compatibility. I have not filed a bug report at microsoft. ---- Additional Comments From vargaz@freemail.hu 2003-12-09 08:27:00 MST ---- Backspace is defined in most systems as 'replace the character before the backspace with the character after the backspace'. This means that if the backspace is followed by a newline, it has no effect. It works this way in C (printf), python, MS.NET etc. So this is not a bug. ---- Additional Comments From lastfuture@lastfuture.de 2003-12-09 10:16:55 MST ---- I see your point, however I fail to understand why it is that way... if a backspace replaces the character before it with the character after it, shouldn't "hello\b\n" replace the "o" with the linefeed, thus erasing it? does it exclude format effectors? if yes, why? Unknown bug field "cf_op_sys_details" encountered while moving bug <cf_op_sys_details>Debian Sid</cf_op_sys_details> Unknown operating system unknown. Setting to default OS "Other". Skipping unknown keyword: mostfreq.