Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET 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
 
Old February 20th, 2005, 11:25 PM
Authorized User
 
Join Date: Aug 2004
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default read & write file C#


Hi All,

I want to write from a unicode .htm file to aspx page.

I used TextReader, ReadToEnd() method, but it do not display unicode vietnamese.
How did do that?

Thanks.

Minh

 
Old February 21st, 2005, 04:14 PM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 623
Thanks: 0
Thanked 1 Time in 1 Post
Default

use StreamReader instead,
Code:
StreamReader reader = new StreamReader("source.txt", Encoding);
StreamWriter writer = new StreamWriter("dest.txt",Boolean, Encoding);
give one of the unicode encodings to the constructor.(UTF8 is the default)

_____________
Mehdi.
software student.





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to read /write from MPP file using Asp.Net C# amitsrathore General .NET 1 October 25th, 2013 03:08 AM
Read and write excel file using VB6 sjlsysprg1 VB How-To 14 September 21st, 2011 01:21 PM
How to Read,Write, & Save (File Processing) ck C++ Programming 2 April 18th, 2005 07:28 AM
How to Read,Write, & Save (File Processing) ck Visual C++ 1 January 23rd, 2005 02:16 PM
Logging File Access Read & Write ntbluez VBScript 1 November 13th, 2003 12:43 AM





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