DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38467>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38467

           Summary: Apache unable to output wide characters through cgi
                    (C++)
           Product: Apache httpd-2
           Version: 2.3-HEAD
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: critical
          Priority: P1
         Component: mod_cgi
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


Using Debian 2.6, Apache 2.2.0 and gcc 4.0.2, I am unable to output wide
characters of a non-ASCII type through Apache using a CGI script written in C++.

To reproduce this problem, use the following source code:

#include <iostream>
using namespace std;

int main()
{
        setlocale(LC_ALL, "");
        wcout << L"Content-Type: text/html; charset=UTF-8" << endl << endl;     
        wcout << L"aaaa Ã Æ Ç ñ" << endl;
        return 0;
}

I compile this as: 

$ g++ test.cpp -otest.cgi

When I execute this program on the console, I get the following (correct) 
output:

aaaa Ã Æ Ç ñ

Additionally, if I output this code to an html file (locally) by typing

$ ./test.cgi > result.htm

The browser displays the following (correct) output:

aaaa Ã Æ Ç ñ

However, if I run this program as a CGI "script" through Apache on a localhost,
I get the following (INcorrect) output:

aaaa ? AE ? ?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to