aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancis Irving <francis@mysociety.org>2010-03-20 22:16:21 +0000
committerFrancis Irving <francis@mysociety.org>2010-03-20 22:16:21 +0000
commite664d0853a5f9078c397ae86f44d8fe81bdb957d (patch)
tree49f4ef9a5f63ffc5731c1f0c317f0ee75c3eb3a0
parent0e8f9db5038c5dc7e41d9f5dbca531978456c4e9 (diff)
parent22017fbd536acdfb78a33e2a6173c6c0d8400b95 (diff)
Merge commit 'peter/ruby-msg-utf8'
-rw-r--r--vendor/ruby-msg/lib/mapi/msg.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/vendor/ruby-msg/lib/mapi/msg.rb b/vendor/ruby-msg/lib/mapi/msg.rb
index c7cfb5515..fc30a9170 100644
--- a/vendor/ruby-msg/lib/mapi/msg.rb
+++ b/vendor/ruby-msg/lib/mapi/msg.rb
@@ -173,7 +173,7 @@ module Mapi
# parse guids
# this is the guids for named properities (other than builtin ones)
# i think PS_PUBLIC_STRINGS, and PS_MAPI are builtin.
- guids = [PS_PUBLIC_STRINGS] + guids_obj.read.scan(/.{16}/m).map do |str|
+ guids = [PS_PUBLIC_STRINGS] + guids_obj.read.scan(/.{16}/mn).map do |str|
Ole::Types.load_guid str
end
@@ -187,7 +187,7 @@ module Mapi
# parse actual props.
# not sure about any of this stuff really.
# should flip a few bits in the real msg, to get a better understanding of how this works.
- props = props_obj.read.scan(/.{8}/m).map do |str|
+ props = props_obj.read.scan(/.{8}/mn).map do |str|
flags, offset = str[4..-1].unpack 'v2'
# the property will be serialised as this pseudo property, mapping it to this named property
pseudo_prop = 0x8000 + offset
@@ -253,7 +253,7 @@ module Mapi
unless (pad == 0 || pad == 8) and data[0...pad] == "\000" * pad
Log.warn "padding was not as expected #{pad} (#{data.length}) -> #{data[0...pad].inspect}"
end
- data[pad..-1].scan(/.{16}/m).each do |data|
+ data[pad..-1].scan(/.{16}/mn).each do |data|
property, encoding = ('%08x' % data.unpack('V')).scan /.{4}/
key = property.hex
# doesn't make any sense to me. probably because its a serialization of some internal