Bug 10669 - mandroid doesn't work if %CD% contains non-ASCII characters
Summary: mandroid doesn't work if %CD% contains non-ASCII characters
Status: RESOLVED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild ()
Version: 4.6.x
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
: 9898 ()
Depends on:
Blocks:
 
Reported: 2013-02-25 21:57 UTC by Jonathan Pryor
Modified: 2013-03-14 14:11 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Jonathan Pryor 2013-02-25 21:57:08 UTC
(Summary is close but not entirely correct.)

Mandroid doesn't work when:

1. The system Language for non-Unicode programs is a non-ASCII locale.
2. %CD% (the current working directory) contains non-ASCII characters.

This prevents `mandroid` from building on non-English systems.

For example:

1. Open the Control Panel.
1.a: Win8: Desktop > Win+C > Settings > Control Panel
2. Search for Region
3. Open the Region control panel applet.
4. Click the Administrative tab.
5. In the Language for non-Unicode programs section, click the Change system locale... button.
6. Set the Current system locale to e.g. Russian (Russia).
7. Click OK, then Restart now.
8. Log back in, then create a directory named "Джон" (no quotes)
8.a. In case that's unreadable, it's just contains some russian, non-ASCII, characters. Hit translate.google.com, enter ~anything, and repeat until you find an acceptable word. ;-)
9. Open CMD.EXE, then `cd` to the directory created in (8).
10. Run:

> "C:\Program Files (x86)\MSBuild\Xamarin\Android\mandroid.exe" --version > %TMP%\o.txt 2> %TMP%\e.txt
> notepad %TMP%\o.txt

Expected results: o.txt will contain e.g. "mandroid 4.6.0.14738719 Trial".

Actual results: o.txt will contain:

Cannot determine the text encoding for the assembly location: C:\Users\Jonathan\Джон\mandroid-win.exe
Please add the correct encoding to MONO_EXTERNAL_ENCODINGS and try again.

(The directory name will vary depending on where you ran it from.)

Workaround: Change the Language for non-Unicode programs (§6, above) to English.

This has the side effect of making the previous %CD% "C:\Users\Jonathan\????", which is valid ASCII, and things work.

(I'm quite sure this is a horrible horrible workaround.)
Comment 3 Jonathan Pryor 2013-02-26 17:34:03 UTC
Should be fixed in master/db55d435, to land in 4.6.1.
Comment 4 Jonathan Pryor 2013-03-14 14:11:20 UTC
*** Bug 9898 has been marked as a duplicate of this bug. ***