urldecode removes plus sign

북마크 추가

 

 

디코딩 시 + 기호가 사라지는 문제

 

 

arrTmp_Context = arrTmp_Context.replaceAll("%(?![0-9a-fA-F]{2})", "%25");

arrTmp_Context = arrTmp_Context.replaceAll("\\+", "%2b");

strValue = URLDecoder.decode(arrTmp_Context, "UTF-8");

 

 

arrTmp_Context = 인코딩된 문자열 값

 

strValue = 디코딩된 값

 

+ 를 %2b로 바꿔주고 디코드

 

+를 %2b로 바꿔 주기전에 %를 %25로 바꿔줘야됨

AD
관리자
2015-04-02 14:41
SHARE