How encode an Aspose.Words.Document to another encoding (like iso-8859-1 or another)

Last post 07-02-2008, 8:23 AM by alexey.noskov. 5 replies.
Sort Posts: Previous Next
  •  04-05-2007, 6:02 AM 72361

    How encode an Aspose.Words.Document to another encoding (like iso-8859-1 or another)

    Hi,
    I'd like to encode an Aspose.Words.Document to another encoding and I'm stuck.
    Could you help me please?
    Thank you
    Yohann
     
  •  04-05-2007, 8:01 AM 72369 in reply to 72361

    Re: How encode an Aspose.Words.Document to another encoding (like iso-8859-1 or another)

    Hi,

    Please elaborate your question. What encoding do you mean? You can provide some examples of how to do that in Microsoft Word if possible.


    Dmitry Vorobyev
    Fields and Reporting Team Leader
    Aspose Auckland Team
     
  •  04-05-2007, 8:08 AM 72371 in reply to 72369

    Re: How encode an Aspose.Words.Document to another encoding (like iso-8859-1 or another)

    I want to save my document (with an html format) but i'd like to specify too the encoding of my html document.
    My code is :
    ------------------------------------------------------------------------------------
                        saveFileDialog1.Title = "Enregistrer un fichier";
                        saveFileDialog1.FileName = "";
                        saveFileDialog1.Filter = "Fichiers html (*.html)|*.html";
                        if (saveFileDialog1.ShowDialog(this) == DialogResult.OK)
                        {
                            string nomfichier = saveFileDialog1.FileName;
                            doc.SaveOptions.HtmlExportImagesFolderAlias = "images";
                            doc.SaveOptions.ExportImagesFolder = "images";
                            DirectoryInfo di = new DirectoryInfo(doc.SaveOptions.ExportImagesFolder);
                            if (!di.Exists)
                            {
                                di.Create();
                            }
                            FileStream fs = new FileStream(nomfichier, FileMode.Create);
                            doc.Save(fs,SaveFormat.Html);
                            fs.Close();
                        }
    -----------------------------------------------------------------------------------

     
  •  04-06-2007, 6:15 AM 72433 in reply to 72371

    Re: How encode an Aspose.Words.Document to another encoding (like iso-8859-1 or another)

    We have had a similar request recently and logged it as issue #1552 to implement the possibility of specifying an HTML encoding later. In the meantime please use the following workaround:

    http://www.aspose.com/Community/forums/permalink/72118/72118/ShowThread.aspx#72118

    In that code sample standard UTF-8 encoded HTML file produced by Aspose.Words is encoded into another encoding (Windows-1252). You can specify any destination encoding you need.


    Dmitry Vorobyev
    Fields and Reporting Team Leader
    Aspose Auckland Team
     
  •  04-10-2007, 3:04 AM 72601 in reply to 72433

    Re: How encode an Aspose.Words.Document to another encoding (like iso-8859-1 or another)

    Thank your for your answer.
    I solve my problem.
     
  •  07-02-2008, 8:23 AM 133974 in reply to 72361

    Updated component version is available

    The issues you have found earlier (filed as 1552) have been fixed in this update.


    Alexey Noskov
    Developer/Technical Support
    Aspose Auckland Team
     
View as RSS news feed in XML