Bugzilla – Bug 499600
Mono won't start with paths that contains non-ASCII character and MS .Net Fx is not installed
Last modified: 2010-11-20 01:58:55 UTC
Created attachment 289079 [details] Purposed patch User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; zh-CN; rv:1.9.0.9) Gecko/2009040821 Firefox/3.0.9 GTB5 (.NET CLR 3.5.30729) This problem will occur if all of the following conditions are met: 1. The GAC path or application path contains non-ASCII character(e.g. Chinese characters) 2. MS .Net Framework is not installed in the system. Mono will report cannot load mscorlib or cannot load assembly in the case. Reproducible: Always Steps to Reproduce: 1. Ensure .Net Fx is not installed. 2. Put mono and the application into a folder which name contains non-ASCII character (I have only tested Chinese characters, but I an sure that the same applies to other Asia languages). 3. Start the application using mono. Actual Results: The application won't start. Expected Results: The application should start. After my investigation, this problem is caused by encoding of the path. fopen in msvcrt.dll (which is used in win32 for opening assembly if .Net Fx is not present in the system) accept the path in system encoding, but mono internally uses UTF-8 and passes UTF-8 path to fopen. I have fixed this problem in the 2.4 tarball, tested on some machines and it worked very well. But I have found that in SVN head the fopen call moved to mono-filemap.c, so I made a new patch of that. Note that it is migrated from my 2.4 patch, although I don't have time to test it, it shouldn't have any problem.
Created attachment 289146 [details] Patch for 2.4
Duplicate of 464128. *** This bug has been marked as a duplicate of bug 464128 ***