If I execute that :

Dim Temp as string = "This is a text"
Dim sw As StreamWriter
Dim fullFileName as string = "c:\text.tx t"
sw = New StreamWriter(fu llFilename)
sw.Write(temp)
sw.Close()

the resulting file 'Text.txt' has the same length than the string 'temp'.
Same result with I Use BinayWriter.

BUT if 'temp' contains others characters than readable character,...