开发者

How to encrypt unicode character and save to a file?

开发者 https://www.devze.com 2023-03-17 13:19 出处:网络
Can anyone tell me how to encode string and save using vb.net code? sound don\'t understand, right? let\'s say i want to save my string(contain unicode) to file like in NOTEPAD when you write unicode

Can anyone tell me how to encode string and save using vb.net code? sound don't understand, right? let's say i want to save my string(contain unicode) to file like in NOTEPAD when you write unicode and save, you have to choose encoding = Unicode in order to see the same character whe开发者_开发知识库n you open it later. I want to do this can any one tell me(i need code to encrypt string)?

thanks in advance

makara


Does this do what you need, or did I misunderstand the question?

File.WriteAllText(@"C:\foo.txt", 
                  "my string with unicode chars Ω", 
                  System.Text.Encoding.Unicode);
0

精彩评论

暂无评论...
验证码 换一张
取 消