Click here to Skip to main content
15,913,854 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Add event handler for MenuItem click event at right start of event Pin
[Marc]23-Jul-05 23:01
[Marc]23-Jul-05 23:01 
GeneralRe: Add event handler for MenuItem click event at right start of event Pin
thanhannt24-Jul-05 15:45
thanhannt24-Jul-05 15:45 
GeneralRe: Add event handler for MenuItem click event at right start of event Pin
[Marc]24-Jul-05 17:33
[Marc]24-Jul-05 17:33 
GeneralRe: Add event handler for MenuItem click event at right start of event Pin
thanhannt24-Jul-05 22:47
thanhannt24-Jul-05 22:47 
GeneralRe: Add event handler for MenuItem click event at right start of event Pin
[Marc]25-Jul-05 7:26
[Marc]25-Jul-05 7:26 
GeneralRe: Add event handler for MenuItem click event at right start of event Pin
thanhannt25-Jul-05 16:09
thanhannt25-Jul-05 16:09 
GeneralDataGrid navigate through objects Pin
Jan Vanacek23-Jul-05 1:33
sussJan Vanacek23-Jul-05 1:33 
GeneralLost in Unicode Pin
nemo22-Jul-05 16:02
nemo22-Jul-05 16:02 
We have some code ( c#, asp.net codebehind ) that we use to translate small amounts of text between languages. It's pretty simple. We post the text to translate to google and then parse the return HTML stream to get the translated text. All was well until we needed to add chinese to the list of translated languages. I assumed the return from google would have the translated chinese in unicode. So we parsed out the unicode that represents the returned chinese and used the code:

// note: UniResponse contains the byte entries for the returned chinese only
UnicodeEncoding Unicode = new UnicodeEncoding();
int charCount = Unicode.GetCharCount(UniResponse, 0, UniResponse.Length);
char[] chars = new Char[charCount];
Unicode.GetChars(UniResponse, 0, UniResponse.Length, chars, 0);
string s=new string(chars);

This should get the byte stream back to a string type I could add to the dynamically created HTML for the new page. But when our page is displayed, it does show some chinese chars/words/whatever, but they do not match what google shows. We verified we do indeed parse out the correct bytes from the returned HTML. All the samples I could find on CG only translate with the english char set, they all seem to stop short of non-english char sets. When using unicode, I don't have to worry about codepages or anything do I?

If anyone knows of an example or has some words of wisdom concerning the translation process. Please let me know.
TIA Big Grin | :-D
GeneralData binding problem with invisible controls Pin
ComputerNerd9270822-Jul-05 6:47
ComputerNerd9270822-Jul-05 6:47 
GeneralRe: Data binding problem with invisible controls Pin
ComputerNerd9270822-Jul-05 9:16
ComputerNerd9270822-Jul-05 9:16 
QuestionHow to resolve path in Linux? Pin
bondguru21-Jul-05 20:33
bondguru21-Jul-05 20:33 
GeneralMouse events in non Control derived class Pin
Mading21-Jul-05 19:37
Mading21-Jul-05 19:37 
Generaldll cannot be registered Pin
bondguru21-Jul-05 19:29
bondguru21-Jul-05 19:29 
GeneralRe: dll cannot be registered Pin
rwestgraham22-Jul-05 14:27
rwestgraham22-Jul-05 14:27 
Generaldlls on .net framework Pin
Weiye Chen21-Jul-05 16:35
Weiye Chen21-Jul-05 16:35 
GeneralRe: dlls on .net framework Pin
Christian Graus21-Jul-05 16:51
protectorChristian Graus21-Jul-05 16:51 
GeneralRe: dlls on .net framework Pin
Weiye Chen21-Jul-05 16:56
Weiye Chen21-Jul-05 16:56 
GeneralRe: dlls on .net framework Pin
Weiye Chen21-Jul-05 17:03
Weiye Chen21-Jul-05 17:03 
GeneralRe: dlls on .net framework Pin
Christian Graus21-Jul-05 17:19
protectorChristian Graus21-Jul-05 17:19 
GeneralRe: iostream and iostream.h Pin
Weiye Chen21-Jul-05 17:37
Weiye Chen21-Jul-05 17:37 
GeneralRe: iostream and iostream.h Pin
Christian Graus21-Jul-05 18:42
protectorChristian Graus21-Jul-05 18:42 
GeneralReal life analogy on CLR and MSIL Pin
tostali21-Jul-05 2:32
tostali21-Jul-05 2:32 
GeneralRe: Real life analogy on CLR and MSIL Pin
Christian Graus21-Jul-05 16:08
protectorChristian Graus21-Jul-05 16:08 
GeneralRe: Real life analogy on CLR and MSIL Pin
tostali22-Jul-05 20:09
tostali22-Jul-05 20:09 
GeneralRe: Real life analogy on CLR and MSIL Pin
Christian Graus23-Jul-05 2:42
protectorChristian Graus23-Jul-05 2:42 

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.