Azure / azure-storage-cpp

Microsoft Azure Storage Client Library for C++
http://azure.github.io/azure-storage-cpp
Apache License 2.0
132 stars 147 forks source link

Question: object name can be non-ascii? #288

Open yxiang92128 opened 5 years ago

yxiang92128 commented 5 years ago

object name is defined as utility::string_t on a Linux system, cpprest/details/basic_types.h defines utility::string_t as // // On POSIX platforms, all strings are narrow // typedef char char_t; typedef std::string string_t;

We are testing downloading some object with object name in Kanji character and Emojis and it reports errors as " The object <😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊> in bucket <max not be downloaded failed with http code=<404>

Can you please confirm if it works for wide character objname through the sdk? And if so, what do I need to do in order to get this call to work properly:

block_blob = container.get_block_blob_reference(obj_name);

thanks,

Yang

Jinming-Hu commented 5 years ago

Usually the sdk should work with emojis if you set locale to UTF-8.

I just wrote a piece of code to test on Linux,

utility::string_t blob_name = "test😊.txt";
azure::storage::cloud_block_blob blob = blob_container.get_block_blob_reference(blob_name);

and this is what it looks like on Portal,

1

Can you provide your environment details so that I can reproduce the issue?

Jinming-Hu commented 4 years ago

We're going to close this issue because of inactivity, feel free to reopen it if you have any further questions.