æ ø å Æ Ø Å change into .æ ø Ã¥ à  ÃÜ Ã ¿½

Posted on 2008-06-25
Last Modified: 2008-06-25
I'm trying to create a vcs file on the fly and submit it to the user. This works fine but when opening the file in Outlook then characters like æ ø å Æ Ø Å are change into æ ø Ã¥ à  ÃÜ Ã ¿½ characters.

I'm opening the file with the following url:

How do I get the characters to be displayed as they should?
<%@ Page Language="vb" ContentType="text/html" 

    ResponseEncoding="ISO-8859-1" Debug="False" trace="False"%>

<%@ import Namespace="System.IO" %>

<script runat="server"> 

Sub Page_Load(Sender As Object, E As EventArgs) 


   Dim beginDate as Date = Request("Dato")

   Dim endDate as Date  = Request("Dato")

   Dim myLocation as String = ""

   Dim mySubject as String = Request("Subject"))

   Dim myDescription as String = Request("body") & "æ ø å Æ Ø Å"


   Dim mStream As new MemoryStream()

   Dim writer As new StreamWriter(mStream)

   writer.AutoFlush = true 



   writer.WriteLine("PRODID:-//Flo Inc.//FloSoft//EN")



   writer.WriteLine("DTSTART:" & _

            beginDate.ToUniversalTime.ToString("yyyyMMdd\THHmmss\Z") )

   writer.WriteLine("DTEND:" & _

           endDate.ToUniversalTime.ToString("yyyyMMdd\THHmmss\Z") )

   writer.WriteLine("LOCATION:" & myLocation)

   writer.WriteLine("DESCRIPTION;ENCODING=QUOTED-PRINTABLE:" & myDescription)

   writer.WriteLine("SUMMARY:" & mySubject) 






   Response.Clear() 'clears the current output content from the buffer

   Response.AppendHeader("Content-Disposition", _

            "attachment; filename=Appointment.vcs")

   Response.AppendHeader("Content-Length", mStream.Length.ToString())

   Response.ContentType = "application/download"



End Sub


Open in new window

Question by:Tblasters
LVL 96

Accepted Solution

Bob Learned earned 500 total points
ID: 21864666
Try this:

        Dim writer As New StreamWriter(mStream, Encoding.Default)

Author Comment

ID: 21864916
Thanks, that works like a charm!

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now