How to use Process.Start () with unicode-Symbols (e.g. 😜)

I am trying to run a URL with a Unicode character using Process.Start(), but it gives with Win32Exception:

An unhandled exception of type 'System.ComponentModel.Win32Exception' occurred in System.dll

Additional information: Das System kann die angegebene Datei nicht finden 

(in English: "The system cannot find the specified file")

The URL I'm trying to call is http: //💩.la (this is a valid URL, at least for Firefox 38)

After the @Codo suggestion, I changed my code:

string link = "http://💩.la";
try
{
    Process.Start(link);
}
catch (System.ComponentModel.Win32Exception)
{
    Process.Start("IExplore.exe", link);
}
+4
source share
2 answers

Firefox . Unicode, ASCII , , emojis, URL-; . Firefox , , , .

, Punycode . , URL.

URL : http://xn--ls8h.la/

+4

:

http://xn--ls8h.la/ (Punycode)

http://%F0%9F%92%A9.la/ (URL Escape Code)

RFC 3986. URL- US-ASCII.

0

Source: https://habr.com/ru/post/1607264/


All Articles