I have note 2
"Unable to resolve host" when using international domain name
-
Hi,
I could not find the project’s bug tracker on gitlab, so I am reporting this bug through the forum.
When entering a valid HTTP URL where the domain name contain international characters, ICSDroid displays error “Unable to resolve host”
Example URL: https://café-vie-privée.fr/calendar.ics
Guillaume
-
Found a workaround. It’s not straightforward, but I’m sharing this because the information might help fix the issue.
By reading some online document, I learned the standard for international domain name defines a method for normalizing those domains with non-ascii characters, named “ToASCII”.
For testing purpose, I used the tunycode.js library which provide this function.
https://github.com/bestiejs/punycode.js/blob/master/punycode.min.jspunycode.toASCII(‘café-vie-privée’) => “xn–caf-vie-prive-dhbj”
After generating this normalized version, I was finally able to subscribe the desired ICS calender with ICSDroid:
https:// xn–caf-vie-prive-dhbj . fr /calendar.icsUpdate: I was force to add spaces, because bitfire automatically converts normalized ASCII URL back to the unicode URL…
-
This post is deleted! -
Hello,
@guillaumeT1 said:
I could not find the project’s bug tracker on gitlab, so I am reporting this bug through the forum.
There is none. The forum is the right place to discuss this. Also, I’d consider it a missing feature (IDN) and not a bug.
Java’s HttpURLConnection doesn’t handle IDN by default. It should be possible to convert host names by IDN.toASCII(), but I wonder why this is not implemented by default in Java URLs. Maybe because of security reasons, but I guess that wouldn’t apply here.
I’ll have a look at this… in the meanwhile, please just use the ASCII name of the domain.
-
Hi,
That make sense. So please consider this a feature request, as opposed to a bug report.
Using ASCII is fine for now, there are few french-speaking websites using IDN.
But there probably many arab/chineese/russian-speaking websites that do, so it may be more annoying for those users.N.B. I’ve sent a flattr micro-donation as a gesture of support
Guillaume