• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

setContent Type to print French character from URL

 
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
In my first Test1.JSP I am redirecting it to Test2.jsp which in URL has the French characters
<%
response.setContentType("text/html; charset=UTF-8");
response.sendRedirect("Test2.jsp?msgid=�t�");
%>
But when i print the message in Test2.jsp it prints junk characters for � which is not an english character
<%
out.println(request.getParameter("msgid"));
%>
So how can i print it in French charcter
Thanks,
aakash
 
Ranch Hand
Posts: 1061
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Aakash,
try java.net.URLDecoder in Test2.jsp
<%@ page import="java.net.URLDecoder"%>
<%= URLDecoder.decode( request.getParameter("msgid"), "UTF-8" ) %>
cb
[ May 06, 2004: Message edited by: Chris Baron ]
 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
Try to put this tag in your page:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 
I didn't do it. You can't prove it. Nobody saw me. The sheep are lying! This tiny ad is my witness!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic