"http://quellederschönheit.de/<http://xn--quellederschnheit-b0b.de/>"
IS NOT a valid url. It is never going to work.
You want the domain name only in IDN format.
Did you try this, as suggested a while ago?
GetMethod("http://xn--quellederschnheit-b0b.de/");
If you cant hardcode a domain do something like this
String domainfromsomewhere = "quellederschönheit.de";
String idomain = domainfromsomewhere;
String assciiURI = java.net.IDN.toASCII(idomain);
try {
URI newUri = new URI("http", null, assciiURI, 80, null,
null, null);
String newUrl =newUri.toString();
GetMethod(newUrl );
On Wed, Jan 26, 2011 at 8:29 AM, Minhaj <[email protected]> wrote:
> Thanks for the link
>
> When using the java.net.IDN class through following code I'm getting wrong
> url:
>
> @Test
> public void test01(){
> String url =
> "http://quellederschönheit.de/<http://xn--quellederschnheit-b0b.de/>
> ";
> String assciiURI = java.net.IDN.toASCII(url);
> System.out.println(assciiURI);
>
> }
>
> I got the following output:
> xn--http://quellederschnheit-3oc.de/
>
>
> Please advise!
>
>
> On Wed, Jan 26, 2011 at 9:31 AM, Stephen J. Butler <[email protected]
>> wrote:
>
>> On Tue, Jan 25, 2011 at 11:26 PM, Minhaj <[email protected]> wrote:
>> > Thanks for the information :) I never know about puny codes before.
>> > Is there any solution you would like to offer convert puny code domains
>> > before processing?
>> >
>> > Actually I've a webpage where clients passing such domains them-self in a
>> > form(text field).
>>
>> What Java version? Java SE 6 has it built in:
>>
>> http://weblogs.java.net/blog/2007/03/29/international-domain-names
>>
>> Other than that, just google 'java punycode' and choose an
>> implementation that's license compatible with your project.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]