Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

pb unicode avec parametre dans l'url

1 réponse
Avatar
phil89
Bonsoir

je cherche a passer via l'url des donnees au format Unicode
http://192.168.0.3/tst/jsp/xx10f.jsp?param=3D\u015F
Cette url est appel=E9e depuis un programme non Java



La chaine que je passe en argument n'est pas correct malgre mes
conversion en UTF.


Ou est mon erreur
Merci d'avance
Philippe


<%@ page contentType=3D"text/html; charset=3DUTF-8" %>
<%

String decode=3Dnew String("UTF-8");
request.setCharacterEncoding(decode);
String tmp=3Drequest.getParameter("param");


//tEST1

byte[] tur =3D tmp.getBytes(decode);
String str1 =3D new String(tur, decode);

//TEST2
String str2 =3D new String("\u015F");


out.println("bad "+str1); //BAD TURKISH
out.println("OK "+str2);// GOOD TURKISH

%>

1 réponse

Avatar
phil89