Click here to Skip to main content
15,900,725 members
Home / Discussions / C#
   

C#

 
GeneralRe: Subclassing a Checkbox within a ToolStrip Warning Question Pin
Rafone3-Jan-11 2:41
Rafone3-Jan-11 2:41 
QuestionConverting a unicode value (with a surrogate pair) to a character in C# Pin
vnmatt31-Dec-10 4:03
vnmatt31-Dec-10 4:03 
QuestionRe: Converting a unicode value (with a surrogate pair) to a character in C# Pin
Richard MacCutchan31-Dec-10 4:53
mveRichard MacCutchan31-Dec-10 4:53 
AnswerRe: Converting a unicode value (with a surrogate pair) to a character in C# Pin
vnmatt31-Dec-10 5:06
vnmatt31-Dec-10 5:06 
GeneralRe: Converting a unicode value (with a surrogate pair) to a character in C# Pin
Richard MacCutchan31-Dec-10 5:58
mveRichard MacCutchan31-Dec-10 5:58 
GeneralRe: Converting a unicode value (with a surrogate pair) to a character in C# Pin
jschell31-Dec-10 7:43
jschell31-Dec-10 7:43 
GeneralRe: Converting a unicode value (with a surrogate pair) to a character in C# Pin
Richard MacCutchan1-Jan-11 0:36
mveRichard MacCutchan1-Jan-11 0:36 
AnswerRe: Converting a unicode value (with a surrogate pair) to a character in C# Pin
jschell31-Dec-10 7:52
jschell31-Dec-10 7:52 
gordon_matt wrote:
I want to know how to get the correct character from a unicode value which has a surrogate key. For example:


The data type 'char' only has 16 bits.

For C# the full range of unicode characters extends to 10FFFF, which will not fit in a 'char'.

The char represents a code point not a character in the full range of unicode character set.

A surrogate pair is by definition two code points. So to represent it you must have two 'char' values.
Alternatives would be to use an 'int' or a String.
GeneralRe: Converting a unicode value (with a surrogate pair) to a character in C# Pin
vnmatt31-Dec-10 17:39
vnmatt31-Dec-10 17:39 
GeneralRe: Converting a unicode value (with a surrogate pair) to a character in C# Pin
jschell1-Jan-11 10:04
jschell1-Jan-11 10:04 
GeneralRe: Converting a unicode value (with a surrogate pair) to a character in C# Pin
vnmatt1-Jan-11 18:23
vnmatt1-Jan-11 18:23 
GeneralRe: Converting a unicode value (with a surrogate pair) to a character in C# Pin
Richard MacCutchan2-Jan-11 2:40
mveRichard MacCutchan2-Jan-11 2:40 
GeneralRe: Converting a unicode value (with a surrogate pair) to a character in C# Pin
jschell2-Jan-11 8:57
jschell2-Jan-11 8:57 
AnswerRe: Converting a unicode value (with a surrogate pair) to a character in C# Pin
Liao Jichen24-Feb-11 13:37
Liao Jichen24-Feb-11 13:37 
QuestionException Handling Pin
satsumatable31-Dec-10 1:16
satsumatable31-Dec-10 1:16 
AnswerRe: Exception Handling Pin
Hiren solanki31-Dec-10 1:28
Hiren solanki31-Dec-10 1:28 
GeneralRe: Exception Handling Pin
satsumatable31-Dec-10 1:39
satsumatable31-Dec-10 1:39 
AnswerRe: Exception Handling Pin
Hiren solanki31-Dec-10 1:43
Hiren solanki31-Dec-10 1:43 
AnswerRe: Exception Handling Pin
Rob Philpott31-Dec-10 3:22
Rob Philpott31-Dec-10 3:22 
AnswerRe: Exception Handling Pin
Pete O'Hanlon31-Dec-10 3:24
mvePete O'Hanlon31-Dec-10 3:24 
AnswerRe: Exception Handling Pin
jschell31-Dec-10 7:59
jschell31-Dec-10 7:59 
AnswerRe: Exception Handling Pin
ramit singh5-Jan-11 17:18
ramit singh5-Jan-11 17:18 
QuestionWhat free library for printing product details? - we will need tables, colors, frames Pin
haiaw31-Dec-10 0:57
haiaw31-Dec-10 0:57 
AnswerRe: What free library for printing product details? - we will need tables, colors, frames Pin
OriginalGriff31-Dec-10 0:59
mveOriginalGriff31-Dec-10 0:59 
AnswerRe: What free library for printing product details? - we will need tables, colors, frames Pin
Henry Minute31-Dec-10 12:05
Henry Minute31-Dec-10 12:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.