468,121 Members | 1,561 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,121 developers. It's quick & easy.

Exporting Non-English in CSV format

hi,

I trying to export data display on a gridview that supports any language
(like chinese, japanese, thai, french) shown here is chinese only. There is
no problem exporting english language data, problem starts exporting
non-english data using approach shown below, the data is retrieve in database
in an xml format. Is there a simple way to be able to make this work?
Response.ContentEncoding = System.Text.Encoding.UTF8;

Actual Result:

项目å*žå…¬å®¤

Desired Result:

项目办公室

Also, Tried the following:
Response.ContentEncoding = System.Text.Encoding.UTF7;
Response.ContentEncoding = System.Text.Encoding.Default;

No Luck...

//Codes exporting data

StringBuilder sb = null;
sb = ExportAssessmentData();

if (sb != null)
{
Response.ContentEncoding = System.Text.Encoding.UTF8;
Response.ClearContent();
Response.ClearHeaders();
Response.ContentType = "text/comma-seperated-values";
Response.AddHeader("Content-Disposition",
"Attachment;FileName=AssessmentListData.csv");
Response.Write(sb.ToString());
Response.Flush();
Response.Close();
}
//Create string builder data

int iColCount = grdList.Columns.Count;
for (int i = 0; i < iColCount; i++)
{
sb.Append(grdList.Columns[i].HeaderText);
if (i < iColCount - 1)
{
sb.Append(",");
}
}
sb.Append(Environment.NewLine);

Thanks in advanced.
--
MCP Year 2005, Philippines
May 16 '07 #1
0 1501

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Chris | last post: by
1 post views Thread by Jacky11 | last post: by
4 posts views Thread by gs | last post: by
7 posts views Thread by victorsk | last post: by
18 posts views Thread by didacticone | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.