简体   繁体   中英

Convert ASCII sign into a string

我想将表冠的ASCII符号: http : //charmap.de/zeichen/9813转换为字符串,因此可以从n-queens程序中将其用于GUI。

That is not ASCII, that is an Unicode character. The range of ASCII characters stops at Unicode code point 127 decimal.

To have it in a string literal, use its Unicode code point MSDN: Old C# Language Specification: 2.4.1 Unicode character escape sequences :

string crown = "\u2655"

As @jt000 mentioned in their now-removed answer, you do need a font that can render this glyph.

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