Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/277.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何将Process.Start()与unicode符号(如😜;)一起使用_C#_.net_Unicode - Fatal编程技术网

C# 如何将Process.Start()与unicode符号(如😜;)一起使用

C# 如何将Process.Start()与unicode符号(如😜;)一起使用,c#,.net,unicode,C#,.net,Unicode,我正试图使用Process.start()以Unicode符号启动URL,但它给了mit一个Win32Exception: An unhandled exception of type 'System.ComponentModel.Win32Exception' occurred in System.dll Additional information: Das System kann die angegebene Datei nicht finden (中文:“系统找不到指定的文件”)

我正试图使用
Process.start()
以Unicode符号启动URL,但它给了mit一个Win32Exception:

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

Additional information: Das System kann die angegebene Datei nicht finden 
(中文:“系统找不到指定的文件”)

我尝试调用的URL是http://请尝试以下内容:

(Punycode)

(URL转义码)


看一看。URL只能由US-ASCII字符组成。

别让Firefox愚弄你。URL中不允许使用ASCII码以外的Unicode字符,尤其是表情符号;它们需要编码。Firefox是用户友好型的,接受它们,显示它们,但在执行请求后会自动对它们进行编码

如果域名中包含Unicode字符,则需要对其进行编码。如果Unicode字符位于域名之后,则需要对其进行URL编码


您案例的有效URL是:

您尝试过URL转义格式吗?%F0%9F%92%A9()您本可以为示例选择较少的“冒犯”字符;-)但无论如何。您可以随时使用它并将其输入到调用.Process.Start(“http://@GuyMontag,以下两项对我来说在Windows 8.1和IE 11(11.0.9600)上都很好:
Process.Start(”http://xn--ls8h.la/”;
进程启动(“IExplore.exe”http://xn--ls8h.la/")
。您的Windows和IE版本是什么?这是Windows 7 Enterprise(64位,SP1)和IE 11Hi,谢谢您,很高兴知道。不幸的是
过程。开始(“http://xn--ls8h.la/“”
产生相同的错误(可能尝试转换punycode,结果与以前相同的url…?)你能用你的代码打开任何URL吗?它真的与表情符号有关吗?这是肯定的,它与表情符号有关。我可以提供一个代码示例,但任何URL都可以正常工作(甚至path中的表情符号,例如:您使用的是什么版本的Windows?您的默认浏览器是什么?其他人也有类似的问题,但与表情符号没有特别关系。您尝试过吗?这是Windows 7 Enterprise,默认浏览器是Firefox。我明天将尝试您链接的解决方案。提前感谢。)