#define BORDER_SIZE 2
#define CELL_PADDING 2
#define CELL_SPACING 2
-#define CHAR_ENCODING "ISO-8859-1"
+#define CHAR_ENCODING "UTF-8"
/* Stylesheet names */
#define FILENAME_NONE ""
ctl->path = NULL;
ctl->dirOutput = NULL;
ctl->fileHtml = NULL;
- ctl->encoding = NULL;
+ ctl->encoding = g_strconcat(CHAR_ENCODING, NULL);
ctl->stylesheet = EXPORT_HTML_ID_NONE;
ctl->nameFormat = EXPORT_HTML_FIRST_LAST;
ctl->banding = FALSE;
entry = exporthtml_find_stylesheet( ctl );
fprintf( stream,
- "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">\n" );
+ "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n" );
+ fprintf( stream,
+ "\"http://www.w3.org/TR/html4/loose.dtd\">\n" );
fprintf( stream, "<html>\n" );
fprintf( stream, "<head>\n" );
fprintf( stream, "href=\"%s\" >\n", entry->fileName );
}
}
- fprintf( stream, "<body>\n" );
fprintf( stream, "</head>\n" );
}
htmlFile = g_fopen( ctl->path, "wb" );
if( ! htmlFile ) {
/* Cannot open file */
- printf( "Cannot open file for write\n" );
+ g_print( "Cannot open file for write\n" );
ctl->retVal = MGU_OPEN_FILE;
return;
}
exporthtml_fmt_folder( ctl, htmlFile, rootFolder );
tt = time( NULL );
+#ifdef SOLARIS
+ fprintf(htmlFile, "<p>%s</p>\n", ctime_r(&tt, buf, sizeof(buf)));
+#else
fprintf( htmlFile, "<p>%s</p>\n", ctime_r( &tt, buf ) );
- fprintf( htmlFile, "<hr width=\"100%%\"></hr>\n" );
+#endif
+ fprintf( htmlFile, "<hr width=\"100%%\">\n" );
fprintf( htmlFile, "</body>\n" );
fprintf( htmlFile, "</html>\n" );
xmlprops_set_property_b( props, EXMLPROP_BANDING, ctl->banding );
xmlprops_set_property_b( props, EXMLPROP_FMT_EMAIL, ctl->linkEMail );
xmlprops_set_property_b( props, EXMLPROP_FMT_ATTRIB, ctl->showAttribs );
- xmlprops_save_file( props );
+ if (xmlprops_save_file( props ) != MGU_SUCCESS)
+ g_warning("can't save settings");
xmlprops_free( props );
}