Wrox Programmer Forums
|
All Other Wrox Books Do you have a question about a Wrox book that isn't listed anywhere on p2p.wrox.com or where the forum is locked? Here's a forum to post questions about any other Wrox book so that other readers or one of the authors can help you with your questions. IF YOU ARE LOOKING FOR CODE DO NOT ASK "Where can I find the code for this book?" That question is answered here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the All Other Wrox Books section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old March 9th, 2004, 06:21 AM
Registered User
 
Join Date: Feb 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default How can I encode the stream?HELP!

I want to get the response stream from an Chinese web site.
but the chinese character were not encoded correctly.
 I don't know how to encode the chinese characters.

My codes of VB.NET in an ASP.NET project are as follows:



 Dim uri As New Uri("http://www.baidu.com/baidu?word=¤j&cl=3")
        Dim request As WebRequest = WebRequest.Create(uri)

        Dim respo As WebResponse = request.GetResponse

        Dim stream As Stream = respo.GetResponseStream
        Dim reader As New StreamReader(stream, Encoding.UTF8)

        Response.Write(reader.ReadToEnd)

        reader.Close()
        respo.Close()







Similar Threads
Thread Thread Starter Forum Replies Last Post
How to encode query string gurudatta_shelke General .NET 0 August 1st, 2006 05:55 AM
Encode & Decode melvik SQL Server 2000 2 June 2nd, 2004 09:23 AM
need help on auto encode rachelwong ASP.NET 1.0 and 1.1 Basics 1 December 11th, 2003 12:37 AM
encode alihussein3 Javascript 1 October 28th, 2003 05:21 AM
URL Encode ashwin_f16 VBScript 0 September 18th, 2003 01:14 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.