[android-developers] Re: Reading image from SDCard with Arabic FileName

2012-08-15 Thread RichardC
Did you get the file name by enumerating the directory contents or entering 
the file name some other way?

What version of Android are you trying this on?

On Wednesday, August 15, 2012 9:35:38 AM UTC+1, Muhammad Rashid wrote:

 Dear all,

 I want to read images from sdcard. These images are of different names 
 like a.jpg and موافق.jpg etc. Some of them are english names and some are 
 with arabic names.
 The problem is that when I make File as File imageFile = new 
 File(pathFromSDCard), It shows file does not exists for all images with 
 arabic names. It works for images with english names. Is there any 
 workaround? 

 Regards


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Reading image from SDCard with Arabic FileName

2012-08-15 Thread Muhammad Rashid
I get the file path like /mnt/sdcard/DCIM/Camera/حفظ.jpg. Then I made file 
by File file = new File(path). Here it says file does not exists.
I am using Android OS 2.3.6

On Wednesday, August 15, 2012 2:29:27 PM UTC+5, RichardC wrote:

 Did you get the file name by enumerating the directory contents or 
 entering the file name some other way?

 What version of Android are you trying this on?

 On Wednesday, August 15, 2012 9:35:38 AM UTC+1, Muhammad Rashid wrote:

 Dear all,

 I want to read images from sdcard. These images are of different names 
 like a.jpg and موافق.jpg etc. Some of them are english names and some are 
 with arabic names.
 The problem is that when I make File as File imageFile = new 
 File(pathFromSDCard), It shows file does not exists for all images with 
 arabic names. It works for images with english names. Is there any 
 workaround? 

 Regards



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Reading image from SDCard with Arabic FileName

2012-08-15 Thread RichardC
How did you get the path name into your program? If you used cut/paste 
there could be problems with Unicode.  Have you tried enumerating the 
directory contents from your Android program and opening the file using the 
path returned from:
http://developer.android.com/reference/java/io/File.html#listFiles()   ?


On Wednesday, August 15, 2012 10:38:54 AM UTC+1, Muhammad Rashid wrote:

 I get the file path like /mnt/sdcard/DCIM/Camera/حفظ.jpg. Then I made file 
 by File file = new File(path). Here it says file does not exists.
 I am using Android OS 2.3.6

 On Wednesday, August 15, 2012 2:29:27 PM UTC+5, RichardC wrote:

 Did you get the file name by enumerating the directory contents or 
 entering the file name some other way?

 What version of Android are you trying this on?

 On Wednesday, August 15, 2012 9:35:38 AM UTC+1, Muhammad Rashid wrote:

 Dear all,

 I want to read images from sdcard. These images are of different names 
 like a.jpg and موافق.jpg etc. Some of them are english names and some are 
 with arabic names.
 The problem is that when I make File as File imageFile = new 
 File(pathFromSDCard), It shows file does not exists for all images with 
 arabic names. It works for images with english names. Is there any 
 workaround? 

 Regards



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Reading image from SDCard with Arabic FileName

2012-08-15 Thread Muhammad Rashid
Exactly by enumerating... using listFiles()

On Wednesday, August 15, 2012 2:58:43 PM UTC+5, RichardC wrote:

 How did you get the path name into your program? If you used cut/paste 
 there could be problems with Unicode.  Have you tried enumerating the 
 directory contents from your Android program and opening the file using the 
 path returned from:
 http://developer.android.com/reference/java/io/File.html#listFiles()   ?


 On Wednesday, August 15, 2012 10:38:54 AM UTC+1, Muhammad Rashid wrote:

 I get the file path like /mnt/sdcard/DCIM/Camera/حفظ.jpg. Then I made 
 file by File file = new File(path). Here it says file does not exists.
 I am using Android OS 2.3.6

 On Wednesday, August 15, 2012 2:29:27 PM UTC+5, RichardC wrote:

 Did you get the file name by enumerating the directory contents or 
 entering the file name some other way?

 What version of Android are you trying this on?

 On Wednesday, August 15, 2012 9:35:38 AM UTC+1, Muhammad Rashid wrote:

 Dear all,

 I want to read images from sdcard. These images are of different names 
 like a.jpg and موافق.jpg etc. Some of them are english names and some are 
 with arabic names.
 The problem is that when I make File as File imageFile = new 
 File(pathFromSDCard), It shows file does not exists for all images with 
 arabic names. It works for images with english names. Is there any 
 workaround? 

 Regards



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en