Class: Ole::Types::Lpwstr
Overview
for VT_LPWSTR
Constant Summary collapse
- FROM_UTF16 =
Iconv.new 'utf-8', 'utf-16le'
- TO_UTF16 =
Iconv.new 'utf-16le', 'utf-8'
Class Method Summary collapse
Methods inherited from String
Class Method Details
.dump(str) ⇒ Object
47 48 49 50 |
# File 'lib/ole/types.rb', line 47 def self.dump str # need to append nulls? TO_UTF16.iconv str end |
.load(str) ⇒ Object
43 44 45 |
# File 'lib/ole/types.rb', line 43 def self.load str new FROM_UTF16.iconv(str).chomp(0.chr) end |