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
I have a problem with german umlauts in secured datafields. When I saved "grün" (english: green) in a mysql database field, and show it again, i get the following Error:
Encoding::CompatibilityError in Addressees#show
incompatible character encodings: UTF8 and ASCII-8BIT
I had to use force_encode('utf8') for each field.
It this an error in strongbox? Why are the encrypted fields decrypted in ascii-8bit?
The text was updated successfully, but these errors were encountered:
The issue is how Ruby itself handles the decrypted field. "ASCII-8BIT" is an alias for "BINARY" and means "raw-bytes". Ruby chooses this because it doesn't know what the encoding of the field was before it was encrypted. So, yes you have to use force_encode to set the encoding if you need more than ASCII.
The fix would be for the Ruby RSA to use the default encoding and provide a way to override it, like Ruby IO does.
There's a good writeup on Ruby 1.9 encoding issues here:
I have a problem with german umlauts in secured datafields. When I saved "grün" (english: green) in a mysql database field, and show it again, i get the following Error:
Encoding::CompatibilityError in Addressees#show
incompatible character encodings: UTF8 and ASCII-8BIT
I had to use force_encode('utf8') for each field.
It this an error in strongbox? Why are the encrypted fields decrypted in ascii-8bit?
The text was updated successfully, but these errors were encountered: