Azure / azure-storage-java

Microsoft Azure Storage Library for Java
https://docs.microsoft.com/en-us/java/api/overview/azure/storage
MIT License
189 stars 165 forks source link

filename that contains certain characters can't be found by the library #559

Open 4191682 opened 3 years ago

4191682 commented 3 years ago

Which service(blob, file, queue, table) does this issue concern?

blob

Which version of the SDK was used?

com.microsoft.azure azure-storage 8.4.0

What problem was encountered?

when file name contains special characters ("鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥"), the CloudBlockBlob.exists() returns false, but the file is actually there. Here is the example code:

String blobName = "EXP0000001/26-鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥.ppt"; CloudStorageAccount storageAccount = CloudStorageAccount.parse(storageConnectionString); CloudBlobClient blobClient = storageAccount.createCloudBlobClient(); CloudBlobContainer container = blobClient.getContainerReference(containerReference); CloudBlockBlob blob = container.getBlockBlobReference(blobName); System.out.println(blob.exists());

Have you found a mitigation/solution?

No