Bug 313306 (MONO51833) - Backspace character fails to work at the end of a string.
Summary: Backspace character fails to work at the end of a string.
Status: RESOLVED INVALID
Alias: MONO51833
Product: Mono: Runtime
Classification: Mono
Component: misc (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Minor
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords: interop
Depends on:
Blocks:
 
Reported: 2003-12-07 23:25 UTC by Peter Marquardt
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 18:21:14 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.