You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, kamaki crashes if it encounters a filename with weird characters.
d@C:/tmp/roz$ echo "This is a kamaki test" > $(dd if=/dev/urandom bs=5 count=1)
1+0 records in
1+0 records out
5 bytes (5 B) copied, 2.2886e-05 s, 218 kB/s
d@C:/tmp/roz$ ls
??(\?
d@C:/tmp/roz$ cat ¬Â\(\\÷
This is a kamaki test
d@C:/tmp/roz$ kamaki file upload ¬Â\(\\÷
Unknown Error: 'utf8' codec can't decode byte 0xac in position 0: invalid start byte
The text was updated successfully, but these errors were encountered:
Implementing the Swift API means kamaki has to pass filenames as part of HTTP URLs.
To do that, it first encodes the filename string as UTF-8, then URL-encodes it, to make it part of the URL.
This means it has to know the encoding of a filename passed to it at the command line.
It assumes the encoding matches the locale settings of the user.
If your locale settings specify UTF8 as your preferred encoding, then the problem is that the filename you are specifying is not valid UTF8. If this is the case, then the error message should change to better reflect this, e.g., "The string '...' is not valid based on your locale settings (codec: 'utf8').".
saxtouri
added a commit
to saxtouri/kamaki
that referenced
this issue
Jul 30, 2014
Fixesgrnet#41
This bug was located at the code that parses the command terms.
If a term is invalid with respect to the current locale settings,
an "Unknown error" was being raised.
Kamaki is now reporting a descriptive error with a reference to
the faulty term.
At the moment, kamaki crashes if it encounters a filename with weird characters.
The text was updated successfully, but these errors were encountered: