lib/pagseguro/notification.rb in pagseguro-0.1.6 vs lib/pagseguro/notification.rb in pagseguro-0.1.7.beta.0
- old
+ new
@@ -43,17 +43,17 @@
end
# Normalize the specified hash converting all data to UTF-8
def normalize(hash)
each_value(hash) do |value|
- value.to_s.unpack('C*').pack('U*')
+ Utils.to_utf8(value)
end
end
# Denormalize the specified hash converting all data to ISO-8859-1
def denormalize(hash)
each_value(hash) do |value|
- value.to_s.unpack('U*').pack('C*')
+ Utils.to_iso8859(value)
end
end
# Return a list of products sent by PagSeguro.
# The values will be normalized