Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

a - makes â?" - encoding characters?

3 views
Skip to first unread message

David Lozzi

unread,
Jun 7, 2007, 12:38:48 PM6/7/07
to
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

unread,
Jun 7, 2007, 12:41:04 PM6/7/07
to
In the true output, the ? is a wacked out E...


"David Lozzi" <dlo...@nospam.nospam> wrote in message
news:B40903C9-8AC9-42F2...@microsoft.com...


> 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?

David Lozzi

unread,
Jun 7, 2007, 12:51:42 PM6/7/07
to
Found it. Changed to


Dim text() As Byte = Encoding.Default.GetBytes(BuildNewPage)

Thanks!

"David Lozzi" <dlo...@nospam.nospam> wrote in message

news:OhSclKSq...@TK2MSFTNGP04.phx.gbl...

0 new messages