Howdy,
I have a simple CMS tool on a site, and the app edits the page directly and
puts in the new HTML from the editor. The problem i have is that they are
pasting items from MS Word, and Word likes to take two dashs and smush them
into a single long dash - chr(151). When I open the file to save the text, i
do the following, and it appears that the encoding is throwing an issue and
convers the - to â?". How do I keep the correct encoding?
Dim fs As FileStream
fs = File.Open(path, FileMode.Create)
Dim text() As Byte = New UTF8Encoding(True).GetBytes(BuildNewPage)
fs.Write(text, 0, text.Length)
fs.Close()
fs.Dispose()
When i hit send it didnt like the characters in this message so you may not
be seeing exactly what i'm seeing... sorry. but i hope you understand the
issue.
Thanks!!
David Lozzi
David Lozzi - 07 Jun 2007 17:41 GMT
In the true output, the ? is a wacked out E...
> Howdy,
>
[quoted text clipped - 20 lines]
>
> David Lozzi
David Lozzi - 07 Jun 2007 17:51 GMT
Found it. Changed to
Dim text() As Byte = Encoding.Default.GetBytes(BuildNewPage)
Thanks!
> In the true output, the ? is a wacked out E...
>
[quoted text clipped - 23 lines]
>>
>> David Lozzi