Skip to content
  • Jean Boussier's avatar
    d6929e5a
    Handle binary strings in Active Record serialized columns · d6929e5a
    Jean Boussier authored
    Serialized attributes stored in BLOB columns will be loaded
    with the `ASCII-8BIT` (AKA BINARY) encoding.
    
    So unless the serialized payload is pure ASCII, they need
    to have the same internal encoding to be properly compared.
    
    Since the serializer have no way to know how the string will
    be stored, it's up to the column type to properly set the
    encoding.
    d6929e5a
    Handle binary strings in Active Record serialized columns
    Jean Boussier authored
    Serialized attributes stored in BLOB columns will be loaded
    with the `ASCII-8BIT` (AKA BINARY) encoding.
    
    So unless the serialized payload is pure ASCII, they need
    to have the same internal encoding to be properly compared.
    
    Since the serializer have no way to know how the string will
    be stored, it's up to the column type to properly set the
    encoding.
Loading