I have a servlet that sends a file to the browser, i get the data from
the datastore.

I send this headers in the servlet.

if (request.isSecure()) {
            response.addHeader("Pragma", "no-cache");
            response.addHeader("Expires", "-1");
            response.addHeader("Cache-Control", "no-cache");
    } else {
            response.addHeader("Cache-Control", "private");
            response.addHeader("Pragma", "public");
    }

    if (isIE) {
            response.addHeader("Content-Disposition", "attachment;
filename=\"" + encName + "\"" );
            response.addHeader("Connection", "close");
            response.setContentType("application/force-download; name=
\"" + encName + "\"" );
    } else {
        response.addHeader("Content-Disposition", "attachment;
filename=\"" + encName + "\"" );
        response.setContentType("application/octet-stream; name=\"" +
encName + "\"" );
        if (contentLen > 0) {
            response.setContentLength(contentLen);
        }
    }

Then i send the file to the browser, but i'm having troubles with the
file encoding.

For example, in the downloaded file i get a line like this

howDoesItWorksStep21Description=El usuario elige la operadora de su
tel??fono m??vil.

But the data is stored right in the datastore ("El usuario elige la
operadora de su teléfono móvil.")

Does anyone have idea how can i do to fix it? Am I missing any header?

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to