简体   繁体   中英

.NET Console Playing Sounds While Writing Certains Strings

I have a .NET script implemented as a console application. During execution it writes debug information to the console. During the script, the application occasionally beep several times in succession. Looking closer it seems to happen everytime certain characters are printed.

Is there any special characters that would cause the system to beep when read into memory or printed to the screen in .NET?

The characters resembles this:

ר×>×'ת ×"ס×o×'ס צ'×צ'× ××?×'×? ×o××'×" ×'ר××z× ×T×" ×"×z×פע ×o×zצ××? ×?ת ×-×ש×" ×''ס×Tק×" פר×"×T×T×- ×"ת××?ר ×'×z×'×" ×"×?×-×Tק××Y

and this

é>┼ å╬¶æ%<è?½ç½' å¼æ-°ç-'å>¢ é>┼ 嫣红é?╬ä¸S 害ç^¶ä»╬äº é>┼ å°?å^?è¯^ç-. 为è§?å┼·è¡ é>┼ è?½çY³ç< æ<> è¿«ä¼-å±^æo é>┼ æ£æ^'åSªåS> è?¥æ'ä¼-人 é>┼ 为åS©å┼·è¡? æ£æ^'å?-ä¼ é>┼ å┼·è¡?æ^?åSY å®Oæ^?ä»»åS é>┼ å"¿å?被æ?? è"¡äº¬ç<'æ? é>┼ é"?æ%<æ??人 è¯?æ?®ç¡®å╬ é>┼ã??æ- æƒ.åZYæ~¯ æ^?家å?Z é>┼ è<¥é£zæ"¯æO? 追å'½å¼?è§ é>┼ æ- æƒ.æ£æ^' å?'çZ°çoYç> é>┼ è<¥é£z失æ~Z é"?æ%<心ç- é>┼

But I haven't gotten them to beep by trying to write them to the console manually.

我猜你正在打印一个映射到ASCII Bell字符的字符: 关于这个问题的MSDN博客

The console will beep when an ASCII BEL character (0x07) is output. Try:

Console.Write('\x07');

You will not see that character displayed on the screen.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM