topical media & game development

talk show tell print

lib-ch-example-ref-wcgi-setCharSet.cgi / cgi



  #!/bin/ch
  /* Copyright (c) 2001 by SoftIntegration, Inc. All Rights Reserved */
  include <wcgi.h>
  
  int main() {
    class CResponse Response;
    chchar *charSet_def, *charSet_cur;
  
    // get default char set
    charSet_def = Response.getCharSet();
    // put char set "ISO-LATIN-1"
    Response.setCharSet(L"ISO-LATIN-1");
    // get current char set
    charSet_cur = Response.getCharSet();
  
    Response.begin();
    Response.title(L"Test of Response.setCharSet and Response.getCharSet");
    printf("<H1> Test of Response.setCharSet and Response.getCharSet </H1> 
\n"); printf("The Current Char Set is : "); fputws(charSet_def ? charSet_def : L"(null)", stdout); printf(" <br>\n"); printf("The Current Char Set is : "); fputws(charSet_cur ? charSet_cur : L"(null)", stdout); printf(" <br>\n"); Response.end(); }


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.