如何导出具有印地文字体名称的Doc文件

时间:2014-04-09 06:58:47

标签: sql vb.net export

我在Sql Server DB中保存了一个doc文件及其名称为hindi字体。并且在DB Field中显示时它显示正确。但是当我将文本导出到word文档时,我得到的字体就像是हिन.docx。我在vb.net中使用以下代码导出文件:

Dim File As New System.IO.FileInfo(FilePath)  ' File Path Includes the File Name in Hindi Font

Response.Clear()

Response.AddHeader("Content-Disposition", "attachment; filename=" + File.Name)

Response.ContentType = "application/doc"

Response.WriteFile(File.FullName)

Response.End()

请告诉我如何以hindi字体导出名称的文件。

感谢。

1 个答案:

答案 0 :(得分:0)

试试这个:

Response.ContentType = "application/doc"
Response.AddHeader "Content-Type", "text/html;charset=UTF-8"
Response.CodePage = 65001
Response.CharSet = "UTF-8"