Forums Register Login

@page contentType="text/html; charset=UTF-8" ... seems not working

+Pie Number of slices to send: Send
Hi all
I experienced problem with page ecoding- some characters weren't rendered properly.
All my JSP had

<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>

directive set but it didn't help. The only solution I have found it to set http header manualy like that:

<% response.setHeader("Content-Type", "text/html; charset=utf-8"); %>

So the question is why <%@ page contentType=...%> does not affect http headers? And if it does not intent to what is it for?

App server - tomcat 5.5.17

Tnaks in advance
Humans and their filthy friendship brings nothing but trouble. My only solace is this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 4748 times.
Similar Threads
How to force encoding of web browser to UTF-8
Forwarding Response from Servlet to JSP
Unicode convert problem with Jboss in Linux
how can i choose the right encoding to read arabic
Struts 2: Encoding UTF-8 problems
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 07:30:00.