Click here to Skip to main content
15,896,606 members
Home / Discussions / C#
   

C#

 
AnswerRe: static method Pin
Ravi Bhavnani8-Apr-11 9:28
professionalRavi Bhavnani8-Apr-11 9:28 
GeneralRe: static method Pin
Rob Grainger11-Apr-11 13:32
Rob Grainger11-Apr-11 13:32 
GeneralRe: static method Pin
Ravi Bhavnani12-Apr-11 1:53
professionalRavi Bhavnani12-Apr-11 1:53 
QuestionProblem to convert my code and don't know how to search for it over google Pin
Naveed7275-Apr-11 15:44
Naveed7275-Apr-11 15:44 
AnswerRe: Problem to convert my code and don't know how to search for it over google Pin
davidnz5-Apr-11 18:42
davidnz5-Apr-11 18:42 
GeneralRe: Problem to convert my code and don't know how to search for it over google Pin
Naveed7275-Apr-11 19:24
Naveed7275-Apr-11 19:24 
AnswerRe: Problem to convert my code and don't know how to search for it over google Pin
Naveed7275-Apr-11 22:10
Naveed7275-Apr-11 22:10 
AnswerRe: Problem to convert my code and don't know how to search for it over google Pin
Luc Pattyn5-Apr-11 22:47
sitebuilderLuc Pattyn5-Apr-11 22:47 
Hi,

I wrote a little decoder for it:
string s1="this is to be the input string, however the CP message editor page does not like Unicode";
string s2="";
for (int i=0; i<s1.Length; i++) {
    if (s1[i]=='&') {
        int n=0;
        for (int j=6; j<10; j++) {
            char c=s1[i+j];
            int k="0123456789".IndexOf(c);
            n=10*n+k;
        }
        s2+=(char)n;
        i+=10;
    } else {
        s2+=s1[i];
    }
}
log("s1="+s1);
log("s2="+s2);


It turns your specially encoded string into a regular Unicode string, which browsers seem to accept well.

Warning: there isn't any error checking as it is, you may want to improve on that. All I did is assume that every ampersand is the start of a 10-character sequence holding a 4-digit decimal number, which really should be checked.

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.

AnswerRe: Problem to convert my code and don't know how to search for it over google Pin
Luc Pattyn5-Apr-11 23:02
sitebuilderLuc Pattyn5-Apr-11 23:02 
GeneralRe: Problem to convert my code and don't know how to search for it over google Pin
Naveed7275-Apr-11 23:18
Naveed7275-Apr-11 23:18 
GeneralRe: Problem to convert my code and don't know how to search for it over google Pin
Luc Pattyn5-Apr-11 23:39
sitebuilderLuc Pattyn5-Apr-11 23:39 
AnswerRe: Problem to convert my code and don't know how to search for it over google [modified] Pin
davidnz6-Apr-11 0:10
davidnz6-Apr-11 0:10 
GeneralRe: Problem to convert my code and don't know how to search for it over google Pin
Naveed7276-Apr-11 5:18
Naveed7276-Apr-11 5:18 
GeneralRe: Problem to convert my code and don't know how to search for it over google Pin
davidnz6-Apr-11 11:03
davidnz6-Apr-11 11:03 
QuestionC# for Smart Device Pin
kmarine01205-Apr-11 11:19
kmarine01205-Apr-11 11:19 
AnswerRe: C# for Smart Device Pin
Luc Pattyn5-Apr-11 11:39
sitebuilderLuc Pattyn5-Apr-11 11:39 
GeneralRe: C# for Smart Device Pin
kmarine01205-Apr-11 16:08
kmarine01205-Apr-11 16:08 
GeneralRe: C# for Smart Device Pin
kmarine01205-Apr-11 16:36
kmarine01205-Apr-11 16:36 
Questionhi need help plzzzzzzzzz Pin
ace3005-Apr-11 6:33
ace3005-Apr-11 6:33 
AnswerRe: hi need help plzzzzzzzzz PinPopular
Not Active5-Apr-11 6:55
mentorNot Active5-Apr-11 6:55 
AnswerRe: hi need help plzzzzzzzzz PinPopular
Pete O'Hanlon5-Apr-11 6:56
mvePete O'Hanlon5-Apr-11 6:56 
GeneralRe: hi need help plzzzzzzzzz Pin
ace3005-Apr-11 7:26
ace3005-Apr-11 7:26 
GeneralRe: hi need help plzzzzzzzzz Pin
Dave Kreskowiak5-Apr-11 8:16
mveDave Kreskowiak5-Apr-11 8:16 
GeneralRe: hi need help plzzzzzzzzz Pin
Pete O'Hanlon5-Apr-11 11:51
mvePete O'Hanlon5-Apr-11 11:51 
GeneralRe: hi need help plzzzzzzzzz Pin
SledgeHammer015-Apr-11 13:38
SledgeHammer015-Apr-11 13:38 

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.