p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/)
-   General .NET (http://p2p.wrox.com/general-net-122/)
-   -   read & write file C# (http://p2p.wrox.com/general-net/25821-read-write-file-c.html)

minhpx February 20th, 2005 11:25 PM

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


mehdi62b February 21st, 2005 04:14 PM

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.


All times are GMT -4. The time now is 01:18 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
2013 John Wiley & Sons, Inc.