pb unicode avec parametre dans l'url
Bonsoir
je cherche a passer via l'url des donnees au format Unicode
http://192.168.0.3/tst/jsp/xx10f.jsp?param=\u015F
La chaine que je passe en argument n'est pas correct malgre mes conversion en UTF.
Ou est mon erreur
Merci d'avance
Philippe
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
<%@ page contentType="text/html; charset=UTF-8" %>
<%
String decode=new String("UTF-8");
request.setCharacterEncoding(decode);
String tmp=request.getParameter("param");
//tEST1
byte[] tur = tmp.getBytes(decode);
String str1 = new String(tur, decode);
//TEST2
String str2 = new String("\u015F");
out.println("bad "+str1); //BAD TURKISH
out.println("OK "+str2);// GOOD TURKISH
%> |