# \[bug:trunk\] marshal changes \["foo", "bar", "bar"\] to \["foo", "bar", "EUC-JP"\]

**URL:** <https://www.ruby-forum.com/t/bug-trunk-marshal-changes-foo-bar-bar-to-foo-bar-euc-jp/183290>\
**Category:** Development\
**Created:** [February 11, 2010, 8:01am UTC](https://www.ruby-forum.com/t/bug-trunk-marshal-changes-foo-bar-bar-to-foo-bar-euc-jp/183290 "2010-02-11T08:01:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tanaka\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/c67d28/32.png) [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Post date:** [February 11, 2010, 8:01am UTC](https://www.ruby-forum.com/t/bug-trunk-marshal-changes-foo-bar-bar-to-foo-bar-euc-jp/183290/1 "2010-02-11T08:01:50Z")

</div>

e$B0J2\<$N$h$&$K!"e(B  
[“foo”, “bar”, “bar”] e$B$re(B marshal e$B$7$?$O$:$,!"e(Bunmarshal  
e$B$9$k$He(B  
[“foo”, “bar”, “EUC-JP”] e$B$,=P$F$-$^$9!#e(B

% ./ruby -ve ’  
o = [“foo”.force\_encoding(“EUC-JP”)] + [“bar”] \* 2  
p o  
m = Marshal.dump(o)  
p Marshal.load(m)’  
ruby 1.9.2dev (2010-02-11 trunk 26640) [i686-linux]  
[“foo”, “bar”, “bar”]  
[“foo”, “bar”, “EUC-JP”]
