Quantcast
Channel: Active questions tagged utf-8 - Stack Overflow
Viewing all articles
Browse latest Browse all 1152

Download blob to a path using azure blob java sdk with UTF-8 encoded file name

$
0
0

I have blobs in a folder location and sometimes the blob name has some Chinese characters in it. For example, I have blob name as 项目.xlsx. Currently I am using downloadToFile method where am trying to download blob directly to my location. Here I couldn't specify UTF-8 encoding by any params or anything.

BlobClient blobClient = containerClient.getBlobClient(blobItem.getName());blobClient.downloadToFile("C:/check/"+"项目.xlsx");

But in location if I give URL.encoder(项目.xlsx), its working fine, but I want the file name to be preserved. When I try to download, am getting unrecognized characters and marked with ? in the chinese characters file name.Is it possible by some way I can download the file to my local/azure file-share by having UTF-8 encoding so that Chinese characters are preserved? Please provide if any sample code is present.


Viewing all articles
Browse latest Browse all 1152


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>