1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Pack takes Unicode characters, not UTF-8 encodings

This commit is contained in:
Keith Duncan 2013-09-05 16:26:54 +01:00
parent cb697458c6
commit 9950015e57

View file

@ -8,10 +8,10 @@ Shindo.tests('AWS | signed_params', ['aws']) do
end
tests('Keys should be canonicalised using Unicode NFC') do
returns( Fog::AWS.escape( ["C3A9".to_i(16)].pack("U*") ) ) { "%C3%A9" }
returns( Fog::AWS.escape( ["00E9".to_i(16)].pack("U*") ) ) { "%C3%A9" }
tests('Characters with combining mark should be combined and then escaped') do
returns( Fog::AWS.escape( ["0065".to_i(16), "CC81".to_i(16)].pack("U*") ) ) { "%C3%A9" }
returns( Fog::AWS.escape( ["0065".to_i(16), "0301".to_i(16)].pack("U*") ) ) { "%C3%A9" }
end
end
end