topical media & game development

talk show tell print

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



  #!/bin/ch 
  /* Copyright (c) 2001 by SoftIntegration, Inc. All Rights Reserved */
  include <stdio.h>
  include <wcgi.h>
  
  int main() {
    class CResponse Response;
    class CRequest Request;
    class CServer Server;
    chchar *value;
   
    Response.setContentType(L"text/plain");
    Response.begin();
  
    printf("The Result of Server.HTMLEncode: \n");
    value = Request.getForm(L"HTMLToEncode");
    if (value != NULL)
        fputws(Server.HTMLEncode(value), stdout);
    else
        printf("Please input characters for HTML encode first \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.