Bug 27313 - Resource case being ignored
Summary: Resource case being ignored
Status: CONFIRMED
Alias: None
Product: Android
Classification: Xamarin
Component: General (show other bugs)
Version: 4.20.0
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: dean.ellis
URL:
Depends on:
Blocks:
 
Reported: 2015-02-23 13:20 UTC by Paul Johnson
Modified: 2015-07-06 10:03 UTC (History)
2 users (show)

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


Attachments

Description Paul Johnson 2015-02-23 13:20:29 UTC
If I have filename in any of my drawable folders that contains an upper case character, the case is ignored if I try to retrieve the file using the following code

public static int GetResourceIdFromFilename(string filename)
{
     var fn2 = filename.Replace('-', '_');
     fn2 = fn2.Split('.').ToArray()[0];
     var res = ftrack2.Singleton.appContext.Resources.GetIdentifier(fn2, "drawable", ftrack2.Singleton.appContext.PackageName);
     Console.WriteLine("res = {0}", res);
     return res;
}

I would expect a filename such as Fred.png to give an identifier if Fred.png exists. It actually comes back with a 0 unless the filename is fred.png which then gives a correct identifier. From what I've seen, the case should be sensitive rather than insensitive.

=== Xamarin Studio ===

Version 5.7.2 (build 2)
Installation UUID: f3d1a29c-1ba2-4a83-a193-1087efe91a85
Runtime:
	Mono 3.12.0 ((detached/de2f33f)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312000076

=== Xamarin.Android ===

Version: 4.20.0.28 (Business Edition)
Android SDK: /Users/PFJ/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		1.6    (API level 4)
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

=== Apple Developer Tools ===

Xcode 6.1.1 (6611)
Build 6A2008a

=== Xamarin.iOS ===

Version: 8.6.2.22 (Business Edition)
Hash: 862702c
Branch: 
Build date: 2015-02-18 15:19:23-0500

=== Xamarin.Mac ===

Version: 1.12.0.4 (Business Edition)

=== Build Information ===

Release ID: 507020002
Git revision: d6231e6325f274cea59da478410f561312c5b401
Build date: 2015-02-17 19:04:38-05
Xamarin addins: b212fd66838b0d6e2435966e541e66ab9c988698

=== Operating System ===

Mac OS X 10.10.3
Darwin Pauls-iMac.local 14.3.0 Darwin Kernel Version 14.3.0
    Thu Jan 22 23:54:42 PST 2015
    root:xnu-2782.20.26~5/RELEASE_X86_64 x86_64
Comment 1 Ram Chandra 2015-07-06 10:03:14 UTC
I have checked this issue and I am also getting the same behavior.

Screencast: http://www.screencast.com/t/xAs96roFhM
IDE logs: https://gist.github.com/RamChBachkheti/2e5880706ca2d7e61566

Environment Info:

=== Xamarin Studio ===

Version 5.9.4 (build 4)
Installation UUID: 6ea47b0d-1852-4aaf-808d-373ff0a5002b
Runtime:
	Mono 4.0.2 ((detached/c99aa0c)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400020005

=== Apple Developer Tools ===

Xcode 6.3 (7569)
Build 6D570

=== Xamarin.iOS ===

Version: 8.10.2.42 (Enterprise Edition)
Hash: dff6838
Branch: master
Build date: 2015-07-02 01:36:25-0400

=== Xamarin.Android ===

Version: 5.1.4.16 (Enterprise Edition)
Android SDK: /Users/jatin66/Desktop/Backup/android-sdk-macosx
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Xamarin Android Player ===

Version: Unknown version
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Version: 2.0.1.64 (Enterprise Edition)

=== Build Information ===

Release ID: 509040004
Git revision: 0c8e73f6b66e066a642724a8241a0998b6329180
Build date: 2015-06-08 16:52:22-04
Xamarin addins: 7e93e9c3503f28770f23ce1b7eafd829919f18e8

=== Operating System ===

Mac OS X 10.10.3
Darwin Dalvik.local 14.3.0 Darwin Kernel Version 14.3.0
    Mon Mar 23 11:59:05 PDT 2015
    root:xnu-2782.20.48~5/RELEASE_X86_64 x86_64

Note You need to log in before you can comment on or make changes to this bug.