PC Review


Reply
Thread Tools Rate Thread

Different encoding? ( problem on Chinese encoding on textbox ... )

 
 
Boki
Guest
Posts: n/a
 
      28th Apr 2006
Hi All,

Here is the code:

Shell("D:\Program Files\Mozilla Firefox\firefox.exe
http://tw.dictionary.yahoo.com/search?ei=UTF-8&p=" & TextBox1.Text)


If I type English word in TextBox1, I can get correct result, but if I
type Chinese, the result is wrong. It seems that they use different
encoding? am I right? Could you please advice how to solve this
problem?

Thank you very much!

Best regards,
Boki.

 
Reply With Quote
 
 
 
 
Carlos J. Quintero [VB MVP]
Guest
Posts: n/a
 
      28th Apr 2006
Hi Boki,

Just some pointers:

Even if it was plain english, you would have to encode for URL (spaces,
especial characters, etc.). Take a look at the function
System.Web.HttpUtility.UrlEncode (there are overloaded variants to accept an
string or bytes array)

And since it is Chinese, you may also need to encode using
System.Text.Encoding.GetString or GetBytes for the desired encoding (UTF8,
Unicode, etc.)

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio
You can code, design and document much faster:
http://www.mztools.com


"Boki" <(E-Mail Removed)> escribió en el mensaje
news:(E-Mail Removed)...
> Hi All,
>
> Here is the code:
>
> Shell("D:\Program Files\Mozilla Firefox\firefox.exe
> http://tw.dictionary.yahoo.com/search?ei=UTF-8&p=" & TextBox1.Text)
>
>
> If I type English word in TextBox1, I can get correct result, but if I
> type Chinese, the result is wrong. It seems that they use different
> encoding? am I right? Could you please advice how to solve this
> problem?
>
> Thank you very much!
>
> Best regards,
> Boki.
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how does ado.net SqlDataReader.GetString() know which encoding to read the data into a string as? Does sql sever set this at the column data type level, server wide encoding setting, os encoding? Daniel Microsoft C# .NET 1 25th Mar 2007 05:47 PM
how does ado.net SqlDataReader.GetString() know which encoding to read the data into a string as? Does sql sever set this at the column data type level, server wide encoding setting, os encoding? Daniel Microsoft Dot NET Framework 1 8th Mar 2007 11:06 AM
how does ado.net SqlDataReader.GetString() know which encoding to read the data into a string as? Does sql sever set this at the column data type level, server wide encoding setting, os encoding? Daniel Microsoft ADO .NET 0 7th Mar 2007 11:15 PM
how does ado.net SqlDataReader.GetString() know which encoding to read the data into a string as? Does sql sever set this at the column data type level, server wide encoding setting, os encoding? Daniel Microsoft Dot NET 0 7th Mar 2007 11:12 PM
chinese encoding =?Utf-8?B?YWxleA==?= Windows XP Help 1 2nd Dec 2005 06:30 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:04 PM.