p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   General .NET (http://p2p.wrox.com/forumdisplay.php?f=122)
-   -   read & write file C# (http://p2p.wrox.com/showthread.php?t=25821)

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 08:51 AM.

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