Latin1-Character-Problems

Oct 25, 2008 at 11:36 PM
Hi there

ThreeSharp is a nice thing! But i have problems while creating buckets or adding objects containing Non-ASCII-Chars in the Name like some German special chars (e.g. "ä", "ö", "ü" and so on).
When i will add such buckets or objects, there comes an Exception "The request signature we calculated does not match the signature you provided. Check your key and signing method."

When i choose only ASCII-Chars, there are no problems.

How can i deal them?

Kind Regards,
haghue
Nov 2, 2008 at 3:19 PM
To avoid these problems one must urlencode keynames. thats all :)
Jun 7, 2009 at 7:16 PM
Edited Jun 7, 2009 at 7:18 PM

As a follow up to this - I had to remove the percent symbols from the url encoding string to get everything working:

 

 

   string keyName = workingPath.Replace(" ","_s_");               
                keyName = System.Web.HttpUtility.UrlEncode(keyName);
                keyName = keyName.Replace("%","_p_");
                ThreeSharpWrapper s3 = new ThreeSharpWrapper(_s3Config.AccessID, _s3Config.SecretID);
                s3.AddFileObject(_s3Bucket, keyName, workingPath);