[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: [PATCH] KSpread/HTML: dialog for choosing encoding
From:       Lukas Tinkl <lukas () kde ! org>
Date:       2001-07-31 6:43:06
[Download RAW message or body]

Dne út 31. červenec 2001 00:37 Nicolas Goutte napsal(a):
> Okay, there is a patch to let the user choose between UTF-8 and local
> encoding when exporting HTML from KSpread.
>
> In the attached file kspreadhtml.tar.bz2, there are 4 files: 3 new files
> and the diff to the existant files. Everything is for the directory
> "filter/kspread/html".
>
> Known problems: the encoding of the file is not written as a <meta> tag if
> not in UTF-8. I am still trying to find the best way to do that correctly.
>
> And sorry to not have a plain text attachement, but I do not know how long
> an email can be on koffice-devel.
>
> Have a nice day/evening/night!

This is how I did it in the HTML export in Kpresenter, it's simple: :)

  QFont::CharSet chset = KGlobal::charsets()->charsetForLocale();
  QString chsetName = KGlobal::charsets()->name(chset);
 
  QString html;
  for ( unsigned int i = 0; i < slideInfos.count(); i++ ) {
    pgNum = i + 1;
    html = QString( "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 
Transitional//EN\">" );
    html += QString( "<HTML><HEAD><TITLE>%1 - %2</TITLE>\n" ).arg( title 
).arg( slideInfos[ i ] 
    html += QString( "<META HTTP-Equiv=\"Content-Type\" CONTENT=\"text/html; 
charset=%1\">\n" ).arg( chsetName );

-- 
Regards,

Lukáš Tinkl | i18n | KDE development
---------------------------------------------------------------------
SuSE CR, s.r.o. e-mail: lukas.tinkl@suse.cz, lukas@kde.org
Drahobejlova 27 tel:+420 2 8309 5381
190 00 Praha 9 fax:+420 2 8309 5374
Czech Republic http://www.suse.cz
_______________________________________________
Koffice-devel mailing list
Koffice-devel@master.kde.org
http://master.kde.org/mailman/listinfo/koffice-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic