Re: Obtain Unicode value from Character Code?
From: Craig Wagner (craig_d_wagner_at_hotmail.com)
Date: 09/10/04
- Next message: Tom Porterfield: "Re: abstract class inheritance"
- Previous message: Slava M. Usov: "Re: How to retrieve serial number of OS or CPU for copy protection?"
- In reply to: Jon Skeet [C# MVP]: "Re: Obtain Unicode value from Character Code?"
- Next in thread: Jon Skeet [C# MVP]: "Re: Obtain Unicode value from Character Code?"
- Reply: Jon Skeet [C# MVP]: "Re: Obtain Unicode value from Character Code?"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 10 Sep 2004 08:27:02 -0700
Jon Skeet [C# MVP] <skeet@pobox.com> wrote:
>Craig Wagner <craig_d_wagner@hotmail.com> wrote:
>> I have a situation where I have a series of character codes stored in the
>> database. In some cases they are the ASCII value of the character, in other
>> cases they are the > 127 character code value that you use in combination with
>> the ALT key to enter special characters into a document (e.g. ALT+0147 and
>> ALT+0148 get you 'smart quotes').
>
><snip>
>
>> Any suggestions?
>
>I *think* you're after Encoding.Default.
>
>However, the database really ought to be able to know how it's stored
>them and give you the text in Unicode. What's the type of the column,
>what's the database in question, and how are you retrieving the
>database?
The database has stored the value as an integer. The database isn't storing the
character, it's storing the character code (i.e. it's not storing the smart
quote, it's storing 147 as an integer).
The database is SQL Server 2000 and my C# code is calling a stored proc that is
used to populate a DataTable.
--- Craig Wagner, craig.wagner(at)comcast.net Portland, OR "Don't ban high-performance vehicles, ban low-performance drivers!"
- Next message: Tom Porterfield: "Re: abstract class inheritance"
- Previous message: Slava M. Usov: "Re: How to retrieve serial number of OS or CPU for copy protection?"
- In reply to: Jon Skeet [C# MVP]: "Re: Obtain Unicode value from Character Code?"
- Next in thread: Jon Skeet [C# MVP]: "Re: Obtain Unicode value from Character Code?"
- Reply: Jon Skeet [C# MVP]: "Re: Obtain Unicode value from Character Code?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|