Forums Register Login

Decode Search UTF-8 Keywords

+Pie Number of slices to send: Send
Hi All,

http://www.google.co.jp/search?q=%E3%83%95%E3%82%A1%E3%82%A4%E3%83%8A%E3%83%B3%E3%82%B9+%E9%9B%BB%E8%A9%B1%E5%B8%B3+&ie=UTF-8&hl=ja&btnG=Google+%E6%A4%9C%E7%B4%A2&lr=

The above is search url on google.co.jp for Japanese words (ファイナンス 電話帳 ).

The problem is,
How do I decode the Japanese keywords from the above URL.

Any help, is highly appreciated.

Thanks in Advance.
Praveen.
+Pie Number of slices to send: Send
Hi All!

Just encountered the same problem.

I try to decode URL with Japanese search string and can't get "stable" result - for some Japanese characters it's fine but for others it's not OK.
For example, this Japanese string: 貴方のキャリアを最大限に活かし after decoding has the following look: 貴方�?�キャリアを最大�?�?�活�?��?�. As you can see, some characters are decoded fine.

I decode it using the following construct:


Application server - Weblogic 8, but I also tried on Weblogic 9.2 (JDK 1.5) - got the same result.

May be you know how to fix this?
Thanks a lot!
+Pie Number of slices to send: Send
Hi All,

I've solved this problem myself. The problem was in URL encoding for the sake of SEO optimisation. So request.getQueryString() works not the same as request.getRequestURL().

Cheers
Skool. Stay in. Smartness. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 571 times.
Similar Threads
ftps in java
handshake between sap xi & tomcat over https. no trusted certificate found
javax.xml.ws.WebServiceException: Failed to access the WSDL
java.io.IOException: unsupported keyword
Formlogin/Apache/SSL
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 03:25:56.