Comments (5)
Thanks for the report. Just to clarify, are you sure your filenames are UTF-8 and not a Windows charset, eg CP-1252?
from azurestor.
Interesting, uploading works as long as you don't specify the destination filename:
r$> bl0 <- hongstor3$get_blob_endpoint()
r$> cont1 <- blob_container(bl0, "cont1")
r$> storage_upload(cont1, "misc/abcdè.xml")
|===============================================================================| 100%
r$> storage_upload(cont1, "misc/abcdè.xml", "abcdè.xml")
|===============================================================================| 100%Error in process_storage_response(response, match.arg(http_status_handler), :
Bad Request (HTTP 400). Failed to complete Storage Services operation. Message:
InvalidUri
The requested URI does not represent any resource on the server.
from azurestor.
So, this is because on Windows, strings are not encoded as UTF-8, but as Latin1 (or whatever the locale-specific codepage is). If you specify a destination filename with a non-ascii char, it gets mangled by URLencode
which is called inside call_storage_endpoint
:
r$> URLencode("abcdè.xml")
[1] "abcd%E8.xml"
What Azure expects is the UTF8 version, which should be
r$> URLencode(enc2utf8("abcdè.xml"))
[1] "abcd%C3%A8.xml"
The reason it works if you leave the destination out is because then it's generated with basename(src)
, which always outputs UTF8.
An alternative to URLencode(enc2utf8(*))
is curl::curl_escape()
, which always treats strings as UTF8:
r$> curl::curl_escape("abcdè.xml")
[1] "abcd%C3%A8.xml"
from azurestor.
Pushed a fix in the non-ascii branch, can you try it and let me know if you run into problems?
from azurestor.
Hello Hongooi,
Wonderfull, thanks a lot for your quick reply.
I just downloaded the package on your non-ascii branch and it works !!!
Well done : D
PS : I am sorry to have said that my file paths were in UTF-8 whereas it is another encoding ; I should have said characters with accents
In my case, the following powershell command [System.Text.Encoding]::Default.BodyName
outputs iso-8859-1
from azurestor.
Related Issues (20)
- Support versioning for blobs HOT 1
- using token auth somewhere gets switched to access key in the pipeline HOT 2
- Using token auth breaks HOT 1
- storage_load_rds gives error due to memory while download and then read_rds works
- Error in curl::curl_fetch_memory(url, handle = handle) : Timeout was reached: HOT 1
- unused argument (azure_storage_progress_bar = progress) HOT 4
- This repo is missing important files
- Enable blob versioning with `create_blob_container()`
- Writing CSV files With Column Widths Greater Than 255 Characters to Blob Storage
- How to read Excel files in ADLS?
- Support for setting expiry on a per blob basis HOT 1
- TLS Support HOT 1
- Authenticating Using AzureGraph HOT 3
- storage_write_csv2 crashes Rstudio session
- Sourcing R code HOT 1
- SAS Token functions not working HOT 1
- Is this package still maintained HOT 2
- How can I generate a sas token with "sp" prefix and not "sv" when using get_services_sas?
- Using interactive Active Directory/Entra authentication in AuzreStor HOT 2
- Generate SAS tokens with get_service_sas or get_account_sas
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azurestor.