<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How a bullet turns into a beep</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/01/04/1411080.aspx</link><description>Bangs or bells.</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: How a bullet turns into a beep</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/01/04/1411080.aspx#1411455</link><pubDate>Thu, 04 Jan 2007 18:34:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1411455</guid><dc:creator>cocobello</dc:creator><description>&lt;p&gt;Ctrl+G=BEL&lt;/p&gt;</description></item><item><title>re: How a bullet turns into a beep</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/01/04/1411080.aspx#1411526</link><pubDate>Thu, 04 Jan 2007 18:40:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1411526</guid><dc:creator>kiwiblue</dc:creator><description>&lt;p&gt;Can't reproduce on XPSP2. I'm copying it into CMD.EXE console window, and echo actually copies the bullet character.&lt;/p&gt;
</description></item><item><title>re: How a bullet turns into a beep</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/01/04/1411080.aspx#1411585</link><pubDate>Thu, 04 Jan 2007 18:58:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1411585</guid><dc:creator>Rick C</dc:creator><description>&lt;p&gt;On the other hand, if I try, also on XPSP2, it copies the bullet *and* beeps.&lt;/p&gt;
</description></item><item><title>re: How a bullet turns into a beep</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/01/04/1411080.aspx#1411591</link><pubDate>Thu, 04 Jan 2007 19:03:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1411591</guid><dc:creator>kiwiblue</dc:creator><description>&lt;p&gt;Just tried &amp;quot;echo Ctrl+G&amp;quot;, and it beeps nicely, so the internal speaker is OK.&lt;/p&gt;
</description></item><item><title>re: How a bullet turns into a beep</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/01/04/1411080.aspx#1411602</link><pubDate>Thu, 04 Jan 2007 19:07:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1411602</guid><dc:creator>Johannes Rössel</dc:creator><description>&lt;p&gt;Whether this issue is reproducable depends on the settings for the command line window. Since I set my default cmd to Lucida Console some time ago it can actually display Unicode characters directly on the console. If, however, the window is set to use a raster font it only has the OEM codepage and will convert the bullet character into BEL which, on echo, will beep.&lt;/p&gt;
</description></item><item><title>re: How a bullet turns into a beep</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/01/04/1411080.aspx#1411631</link><pubDate>Thu, 04 Jan 2007 19:30:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1411631</guid><dc:creator>Nish</dc:creator><description>&lt;p&gt;&amp;gt;&amp;gt; Type echo ^A where you actually type Ctrl+A where I wrote ^A. The result: A smiling face, ☺ U+263A.) &amp;lt;&amp;lt;&lt;/p&gt;
&lt;p&gt;Raymond,&lt;/p&gt;
&lt;p&gt;Isn't that behavior due to the fact that ASCII 1 is ☺ ?&lt;/p&gt;
</description></item><item><title>re: How a bullet turns into a beep</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/01/04/1411080.aspx#1411668</link><pubDate>Thu, 04 Jan 2007 19:51:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1411668</guid><dc:creator>jim</dc:creator><description>&lt;p&gt;Interesting. A little experiment with a command prompt (XPSP2 again) reveals the following behaviour:&lt;/p&gt;
&lt;p&gt;Most control characters display as ^char and echo as glyphs. ^C aborts. ^G &amp;quot;echos&amp;quot; as a beep only. ^H and ^I are interpreted by the line editor as backspace and tab, respectively. ^J seems to be ignored completely. ^K and ^L echo as glyphs only amongst other input; on their own they just give the &amp;quot;ECHO is on.&amp;quot; message. ^M is interpreted as ENTER. ^S suppresses the next character. ^Z is the end-of-input character; anything after it on a line appears in the line editor but is not echoed.&lt;/p&gt;
&lt;p&gt;Bored? Moi?&lt;/p&gt;
</description></item><item><title>re: How a bullet turns into a beep</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/01/04/1411080.aspx#1411683</link><pubDate>Thu, 04 Jan 2007 20:02:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1411683</guid><dc:creator>Carlos</dc:creator><description>&lt;p&gt;jim missed out ^@, which seems to act as an end-of-input-on-the-current-line character, then prompts for more input on the next line. &amp;nbsp;e.g.:&lt;/p&gt;
&lt;p&gt;C:\&amp;gt;echo hello^@world&lt;/p&gt;
&lt;p&gt;More? dolly&lt;/p&gt;
&lt;p&gt;hellodolly&lt;/p&gt;
</description></item><item><title>re: How a bullet turns into a beep</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/01/04/1411080.aspx#1411694</link><pubDate>Thu, 04 Jan 2007 20:06:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1411694</guid><dc:creator>andy</dc:creator><description>&lt;p&gt;jim's comment about ^Z reminded me of the article &amp;quot;Using the echo command to remember what you were doing.&amp;quot; (&lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/oldnewthing/archive/2004/04/29/123012.aspx"&gt;http://blogs.msdn.com/oldnewthing/archive/2004/04/29/123012.aspx&lt;/a&gt;). &lt;/p&gt;
&lt;p&gt;Instead of pressing the &amp;quot;home&amp;quot;-button and then typing &amp;quot;echo &amp;quot; you can just press the &amp;quot;home&amp;quot;-button and type ^Z (i.e. press CTRL+Z) and get the same effect. 4 keys less to type :)&lt;/p&gt;
</description></item><item><title>re: How a bullet turns into a beep</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/01/04/1411080.aspx#1411695</link><pubDate>Thu, 04 Jan 2007 20:07:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1411695</guid><dc:creator>Mike Dimmick</dc:creator><description>&lt;p&gt;Nish: ASCII 1 is not ☺, it is Start Of Heading (SOH). It may be ☺ in IBM codepage 437, but that's a different thing entirely. Whether the 'C0 Controls' displayed as those symbols or performed their control function depended on which API you were using to display text. If you use the raw 'display a character' BIOS API or write directly into the display buffer, you get the display character; if you use the 'display a string' API the character is interpreted.&lt;/p&gt;
&lt;p&gt;I wrote a library to help port from Symbol Series 3000 (DOS-based with an extended largely-IBM-compatible BIOS) to Windows CE. My implementation of the 'display a string' API currently doesn't emulate a teletype, so character code 7 produces a bullet rather than a beep. The C0 controls weren't actually used much in Series 3000 programs so we tend to fix the program rather than add teletype support to the library.&lt;/p&gt;
</description></item><item><title>re: How a bullet turns into a beep</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/01/04/1411080.aspx#1411740</link><pubDate>Thu, 04 Jan 2007 20:38:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1411740</guid><dc:creator>Nick Fitzsimons</dc:creator><description>&lt;p&gt;Mike Dimmick beat me to explaining ☺, but to Carlos: CTRL-@ is equal to character code 0 (zero), which is ASCII NUL. The use of zero in C as a string terminator might have something to do with the behaviour you're seeing... or it might not :-)&lt;/p&gt;
&lt;p&gt;If you look at an ASCII table, you can see that @ is character 64, and the action of the CTRL key is (nominally) to reset the sixth bit, so that CTRL-@ -&amp;gt; 0 == NUL, CTRL-A -&amp;gt; 1 == SOH, CTRL-G -&amp;gt; 7 == BEL &amp;nbsp;and so forth:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://www.asciitable.com/"&gt;http://www.asciitable.com/&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: How a bullet turns into a beep</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/01/04/1411080.aspx#1411784</link><pubDate>Thu, 04 Jan 2007 21:05:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1411784</guid><dc:creator>Ben Cooke</dc:creator><description>&lt;p&gt;Somehow I had completely forgotten that there were glyphs in those control characters in the olden days. You had me scratching my head for a few minutes thinking &amp;quot;why would a BEL be a bullet?!&amp;quot;.&lt;/p&gt;
&lt;p&gt;I'm sure lots of people of a suitable age remember making silly little demos/games involving those smiley face characters, the card symbols and the musical note. Those arrow characters were quite useful for scroll bars, too. I guess it would have been a waste not to use those characters for glyphs too, since those &amp;lt;32 values could be written to video memory just fine.&lt;/p&gt;
</description></item><item><title>re: How a bullet turns into a beep</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/01/04/1411080.aspx#1412228</link><pubDate>Thu, 04 Jan 2007 22:16:58 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1412228</guid><dc:creator>SM</dc:creator><description>&lt;p&gt;(jim) &amp;gt;&amp;gt;&amp;quot;^J seems to be ignored completely ...^M is interpreted as ENTER.&amp;quot;&lt;/p&gt;
&lt;p&gt;That is interesting. &amp;nbsp;The ^J should be a Linefeed, and ^M should be a Carriage Return. Of course, with windows files, a line ending is noted with the CR LF combination. &amp;nbsp;I guess the enter key in cmd.exe only sends a CR? &amp;nbsp;&lt;/p&gt;
</description></item><item><title>re: How a bullet turns into a beep</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/01/04/1411080.aspx#1412709</link><pubDate>Fri, 05 Jan 2007 00:41:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1412709</guid><dc:creator>Nick</dc:creator><description>&lt;P&gt;So 'echo ^D' prints a diamond. D for diamond, it all makes sense now!&lt;/P&gt;
&lt;P&gt;Regarding andy's comment, if I want to save what I've typed at a prompt, I usually don't press HOME at all. &amp;nbsp;What I do (that works with Bash and CMD) is just press CTRL-C. This cancels and gives me a new prompt, but leaves whatever I had on the previous line intact. Very handy.&lt;/P&gt;
&lt;DIV class=post&gt;[&lt;I&gt;But it doesn't go into the command history, which is might inconvenient. -Raymond&lt;/I&gt;]&lt;/DIV&gt;</description></item><item><title>re: How a bullet turns into a beep</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/01/04/1411080.aspx#1413227</link><pubDate>Fri, 05 Jan 2007 03:29:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1413227</guid><dc:creator>Nick</dc:creator><description>&lt;p&gt;[But it doesn't go into the command history, which is might inconvenient. -Raymond]&lt;/p&gt;
&lt;p&gt;Ah, true enough. I didn't think about that.&lt;/p&gt;
&lt;p&gt;An alternative that does require use of HOME is to type a colon at the start of the line. It gets treated the same as a REM and does stay in the command history.&lt;/p&gt;
</description></item><item><title>re: How a bullet turns into a beep</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/01/04/1411080.aspx#1414348</link><pubDate>Fri, 05 Jan 2007 07:32:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1414348</guid><dc:creator>Norman Diamond</dc:creator><description>
&lt;p&gt;&amp;gt; GetStockFont(OEM_FIXED_FONT)&lt;/p&gt;

&lt;p&gt;I think you need to go into Control Panel and set your system's default language for non-Unicode programs. &amp;nbsp;In fact even if your program IS Unicode I think you have to do that setting. &amp;nbsp;I should read and experiment to see if AppLocale will take care of it. &amp;nbsp;Anyway just getting the default code page changed doesn't get the default font changed.&lt;/p&gt;

&lt;p&gt;&amp;gt; Type echo ^A where you actually type Ctrl+A&lt;/p&gt;

&lt;p&gt;&amp;gt; where I wrote ^A. The result:&lt;/p&gt;

&lt;p&gt;The result is a quotation mark. &amp;nbsp;I think in a command prompt window the command "mode con cp select=" some number will adjust the font together with the code page.&lt;/p&gt;
&lt;div class="post"&gt;[&lt;i&gt;Sigh. "On a Windows XP machine in the default configuration for a US-English system." I assume people are smart enough to figure that out. Are you nitpicking or were you genuinely confused? I can never tell with you. -Raymond&lt;/i&gt;]&lt;/div&gt;</description></item><item><title>re: How a bullet turns into a beep</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/01/04/1411080.aspx#1414937</link><pubDate>Fri, 05 Jan 2007 08:57:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1414937</guid><dc:creator>svark</dc:creator><description>&lt;p&gt;&amp;gt;&amp;gt;Can't reproduce on XPSP2. I'm copying it into &amp;gt;&amp;gt;CMD.EXE console window, and echo actually &amp;gt;&amp;gt;copies the bullet character.&lt;/p&gt;
&lt;p&gt;In the command window properties if the Font is chosen as Lucida it would print a bullet, otherwise if raster fonts is chosen it would sound a bell as Raymond noted.&lt;/p&gt;
</description></item><item><title>re: How a bullet turns into a beep</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/01/04/1411080.aspx#1416728</link><pubDate>Fri, 05 Jan 2007 16:58:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1416728</guid><dc:creator>kiwiblue</dc:creator><description>&lt;p&gt;&amp;gt;&amp;gt; Can't reproduce on XPSP2. I'm copying &lt;/p&gt;
&lt;p&gt;&amp;gt;&amp;gt; it into CMD.EXE console window, and &lt;/p&gt;
&lt;p&gt;&amp;gt;&amp;gt; echo actually copies the bullet character.&lt;/p&gt;
&lt;p&gt;&amp;gt; In the command window properties if the &lt;/p&gt;
&lt;p&gt;&amp;gt; Font is chosen as Lucida it would print a &lt;/p&gt;
&lt;p&gt;&amp;gt; bullet, otherwise if raster fonts is &lt;/p&gt;
&lt;p&gt;&amp;gt; chosen it would sound a bell as Raymond &lt;/p&gt;
&lt;p&gt;&amp;gt; noted.&lt;/p&gt;
&lt;p&gt;As pointed by Johannes R&amp;#246;ssel in 5th reply.&lt;/p&gt;
</description></item><item><title>Beeps from bullets</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/01/04/1411080.aspx#1424305</link><pubDate>Sun, 07 Jan 2007 01:05:41 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1424305</guid><dc:creator>Buck Hodges</dc:creator><description>&lt;p&gt;Way back near the beginning of development of TFS version control, which was called Hatteras back then,&lt;/p&gt;
</description></item><item><title>re: How a bullet turns into a beep</title><link>http://blogs.msdn.com/oldnewthing/archive/2007/01/04/1411080.aspx#1431654</link><pubDate>Mon, 08 Jan 2007 02:25:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1431654</guid><dc:creator>Igor</dc:creator><description>&lt;p&gt;Happy New Year to Raymond. Perhaps associating bullet to beep is intentional ;)&lt;/p&gt;
</description></item></channel></rss>