unicode searching
C#
1
Posts
1
Posters
0
Views
1
Watching
-
I have a text file with unicode strings (T H I S I S A S T R I N G) and I want to search for those strings and convert them to ascii. How do I use string.IndexOf for a unicode value? Say I want to search for: file.IndexOf(Encoding.Unicode.GetBytes("http://")); which obviously doesn't work since there is no byte[] overload. So how do I convert an ascii string to a unicode string? All I really need I guess is how to get "http://" converted to "h\0t\0t\0p\0:\0/\0/\0" and back.