|
-
Dec 28th, 2004, 12:10 AM
#1
Thread Starter
Member
unicode text file
i need to create a unicode text file.
i have lots of unrecognized characters in my database which are swedish and stuff...
how do i write a text file which can support these types of characters?
i need to pass that file to rar as a rarlist of files.
when i created a normal text file, rar cannot understand the other characters, but when i created it in unicode, using ultra edit, rar was able to recognize the characters. so how do i create this file in c#?
-
Dec 29th, 2004, 01:30 AM
#2
Sleep mode
Re: unicode text file
Try something like this , I didn't test it but it should give you the idea :
Code:
Stream st=File.Open("filename",FileMode.Open);
Encoding enc=Encoding.GetEncoding("pass your text here or see other params");
StreamWriter sw=new StreamWriter(st,enc);
sw.Write("write anything to the file");
sw.Close();
-
Jan 20th, 2005, 07:26 AM
#3
New Member
Re: unicode text file
You can use System.IO.StreamWriter class.
You can use the method Write of StreamWriter and can also specify the Encoding when you write into a file !
have a nice day
-
Jan 20th, 2005, 02:00 PM
#4
Sleep mode
 Originally Posted by loverdose
You can use System.IO.StreamWriter class.
You can use the method Write of StreamWriter and can also specify the Encoding when you write into a file !
have a nice day 
That's in another word !huh
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|