Click here to Skip to main content
15,887,414 members
Home / Discussions / C#
   

C#

 
GeneralRe: problem with unicode. Pin
Luc Pattyn12-May-11 1:09
sitebuilderLuc Pattyn12-May-11 1:09 
GeneralRe: problem with unicode. Pin
David198711-May-11 21:29
David198711-May-11 21:29 
GeneralRe: problem with unicode. Pin
David198711-May-11 21:38
David198711-May-11 21:38 
GeneralRe: problem with unicode. Pin
Keith Barrow11-May-11 23:31
professionalKeith Barrow11-May-11 23:31 
GeneralRe: problem with unicode. Pin
Richard MacCutchan11-May-11 22:23
mveRichard MacCutchan11-May-11 22:23 
AnswerRe: problem with unicode. Pin
Richard MacCutchan11-May-11 6:28
mveRichard MacCutchan11-May-11 6:28 
GeneralRe: problem with unicode. Pin
prasadbuddhika11-May-11 6:31
prasadbuddhika11-May-11 6:31 
AnswerRe: problem with unicode. [modified] Pin
Luc Pattyn11-May-11 7:17
sitebuilderLuc Pattyn11-May-11 7:17 
if what you have is a six-character string containing a real backslash, a U, and four hex digits, then you could turn that into a single character like so, however this situation is rare, it would typically occur only if you plan on writing your own C# compiler!
string s=@"\U0061";  // the @ in front tells the compiler to ignore the special meaning of backslashes
int uni;
if (s==null || s.Length!=6 || s[0]!='\\' || s[1]!='U' || 
	!int.TryParse(s.Substring(2, 4), NumberStyles.HexNumber, null, out uni))
		throw new Exception("Bad unicode string in: "+s);
char c=(char)uni;
log("uni="+uni.ToString("X4"));
log("c="+c);


Smile | :)
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.

modified on Wednesday, May 11, 2011 1:23 PM

AnswerRe: problem with unicode. Pin
jschell11-May-11 8:31
jschell11-May-11 8:31 
QuestionForms.Panel - stop OnKeyDown repeating [modified] Pin
lukeer11-May-11 4:31
lukeer11-May-11 4:31 
AnswerRe: Forms.Panel - stop OnKeyDown repeating Pin
Luc Pattyn11-May-11 4:38
sitebuilderLuc Pattyn11-May-11 4:38 
GeneralRe: Forms.Panel - stop OnKeyDown repeating Pin
lukeer11-May-11 20:16
lukeer11-May-11 20:16 
AnswerRe: Forms.Panel - stop OnKeyDown repeating Pin
Luc Pattyn12-May-11 0:42
sitebuilderLuc Pattyn12-May-11 0:42 
AnswerRe: Forms.Panel - stop OnKeyDown repeating Pin
lukeer11-May-11 21:08
lukeer11-May-11 21:08 
GeneralRe: Forms.Panel - stop OnKeyDown repeating Pin
BobJanova12-May-11 1:43
BobJanova12-May-11 1:43 
QuestionRegex to retrieve phone numbers Pin
Etienne_12311-May-11 0:39
Etienne_12311-May-11 0:39 
AnswerRe: Regex to retrieve phone numbers Pin
Hiren solanki11-May-11 1:32
Hiren solanki11-May-11 1:32 
GeneralRe: Regex to retrieve phone numbers Pin
Etienne_12311-May-11 1:42
Etienne_12311-May-11 1:42 
GeneralRe: Regex to retrieve phone numbers Pin
Hiren solanki11-May-11 1:44
Hiren solanki11-May-11 1:44 
GeneralRe: Regex to retrieve phone numbers Pin
Etienne_12311-May-11 1:51
Etienne_12311-May-11 1:51 
GeneralRe: Regex to retrieve phone numbers Pin
Hiren solanki11-May-11 1:53
Hiren solanki11-May-11 1:53 
AnswerRe: Regex to retrieve phone numbers Pin
PIEBALDconsult11-May-11 2:40
mvePIEBALDconsult11-May-11 2:40 
QuestionCan't apply Contrast of Image Pin
Anubhava Dimri11-May-11 0:04
Anubhava Dimri11-May-11 0:04 
AnswerRe: Can't apply Contrast of Image Pin
Luc Pattyn11-May-11 0:21
sitebuilderLuc Pattyn11-May-11 0:21 
GeneralRe: Can't apply Contrast of Image Pin
Anubhava Dimri11-May-11 0:35
Anubhava Dimri11-May-11 0:35 

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.