Write Unicode char with StreamWriter
Imports System.Globalization
Imports System.IO
Module Example
Public Sub Main()
Dim sw As New StreamWriter("test.txt")
Dim grapheme As String = ChrW(&H0061) + ChrW(&h0308)
sw.WriteLine(grapheme)
Dim singleChar As String = ChrW(&h00e4)
sw.WriteLine(singleChar)
sw.WriteLine("{0} = {1} (Culture-sensitive): {2}", grapheme, singleChar, String.Equals(grapheme, singleChar, StringComparison.CurrentCulture))
sw.Close()
End Sub
End Module
Related examples in the same category