Sha256: 1b30cc663125086394774ac411fb94f5e76913685ac1fb39de1ee3f96a0dc3ab

Contents?: true

Size: 384 Bytes

Versions: 37

Compression:

Stored size: 384 Bytes

Contents

module RubySMB
  module Field
    # Represents a String in UTF-16LE
    class String16 < BinData::String
      def assign(val)
        super(val.to_s.encode('utf-16le')).force_encoding('utf-16le')
      end

      def snapshot
        super.force_encoding('utf-16le')
      end

      def read_and_return_value(io)
        super.force_encoding('utf-16le')
      end
    end
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
ruby_smb-3.3.12 lib/ruby_smb/field/string16.rb
ruby_smb-3.3.11 lib/ruby_smb/field/string16.rb
ruby_smb-3.3.10 lib/ruby_smb/field/string16.rb
ruby_smb-3.3.9 lib/ruby_smb/field/string16.rb
ruby_smb-3.3.7 lib/ruby_smb/field/string16.rb
ruby_smb-3.3.6 lib/ruby_smb/field/string16.rb
ruby_smb-3.3.5 lib/ruby_smb/field/string16.rb
ruby_smb-3.3.4 lib/ruby_smb/field/string16.rb
ruby_smb-3.3.3 lib/ruby_smb/field/string16.rb
ruby_smb-3.3.2 lib/ruby_smb/field/string16.rb
ruby_smb-3.3.1 lib/ruby_smb/field/string16.rb
ruby_smb-3.3.0 lib/ruby_smb/field/string16.rb
ruby_smb-3.2.8 lib/ruby_smb/field/string16.rb
ruby_smb-3.2.7 lib/ruby_smb/field/string16.rb
ruby_smb-3.2.6 lib/ruby_smb/field/string16.rb
ruby_smb-3.2.5 lib/ruby_smb/field/string16.rb
ruby_smb-3.2.4 lib/ruby_smb/field/string16.rb
ruby_smb-3.2.3 lib/ruby_smb/field/string16.rb
ruby_smb-3.2.2 lib/ruby_smb/field/string16.rb
ruby_smb-3.2.1 lib/ruby_smb/field/string16.rb