Changeset 667


Ignore:
Timestamp:
10/22/14 01:51:28 (5 years ago)
Author:
jls17
Message:
  • changed the webpage encoding to utf-8 if app runs in utf8-mode
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/work_320/output/WebPage.cpp

    r538 r667  
    7474void CWebPage::PageHeader(ostream &strm) 
    7575{ 
     76        CARInside *pInside = CARInside::GetInstance(); 
     77        const char *encoding = (pInside->appConfig.bUseUtf8 ? "UTF-8" : "ISO-8859-1"); 
     78 
    7679        strm << "<?xml version=\"1.0\" ?>" << newline; 
    7780        strm << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">" << newline; 
    7881        strm << "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">" << newline; 
    79         strm << "<!-- saved from url=(0025)http://arinside.org/ -->" << newline; 
    80         strm << "<head>" << newline; 
     82        strm << "<head>" << newline;     
     83        strm << "<meta http-equiv=\"content-type\" content=\"text/html; charset=" << encoding << "\" />" << newline; 
     84        strm << "<meta http-equiv=\"content-language\" content=\"EN\" />" << newline; 
    8185        strm << "<title>" << title << "</title>" << newline; 
    82         strm << "<meta http-equiv=\"content-language\" content=\"EN\" />" << newline; 
    83         strm << "<meta http-equiv=\"content-type\" content=\"text/html; charset=ISO-8859-1\" />" << newline; 
    8486        strm << "<meta http-equiv=\"expires\" content=\"-1\" />" << newline; 
    8587        strm << "<meta name=\"author\" content=\"ARInside\" />" << newline; 
Note: See TracChangeset for help on using the changeset viewer.