开发者

C# Escape sequence for unicode currency symbols

I'm storing a list of currencies, with exchange rates etc. in my database (Ms SQL).

I also store the unicode representation of the currency symbol, so for e.g. Czech Republic, Koruny I have "\u004b\u010d" stored in an nvarchar(50) column.

When I load t开发者_如何学Pythonhe list of currencies from the database, it has changed to escape sequence to this: "\\u004b\\u010d".

Is there any way easier than stripping away \u, parsing the remaining part to an Int32 using System.Globalization.NumberStyles.HexNumber, type casting that to a char and displaying the char?


If it is an nvarchar column you could store directly the corresponding unicode value: . Why would you ever store it as "\u004b\u010d"?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜