Issue #8995 has been updated by nobu (Nobuyoshi Nakada).


?????????潟?潟?若????c?潟?育????с???????????????????c?????с????峨勝?????c?????????c?????????????????с??????????????
----------------------------------------
Bug #8995: ?????ゃ????????若?帥?????絖??????????? encode! ????????? readbyte ??????????紊??????????
https://bugs.ruby-lang.org/issues/8995#change-42338

Author: hsbt (Hiroshi SHIBATA)
Status: Third Party's Issue
Priority: Normal
Assignee: 
Category: core
Target version: current: 2.1.0
ruby -v: ruby 2.1.0dev (2013-10-07 trunk 43160) [x86_64-darwin12.5.0]
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN


=begin
Rails ??篁ヤ????潟?若???????????? 2.0 ??? 2.1 ???х?違???????????с?????

((<encode_params|URL:https://github.com/rails/rails/blob/3-2-stable/actionpack/lib/action_dispatch/http/parameters.rb#L51>))

篁ヤ????????絨??宴?若?鴻?с?????

 $ ruby -v
 => ruby 2.1.0dev (2013-10-07 trunk 43160) [x86_64-darwin12.5.0]
 $ ruby -rstringio -e "Encoding.default_internal = Encoding::UTF_8; p StringIO.new(File.read('x.jpg')).readbyte"
 => 255
 $ ruby -rstringio -e "Encoding.default_internal = Encoding::UTF_8; p StringIO.new(File.read('x.jpg').force_encoding('UTF-8').encode\!).readbyte"
 => 239

???????2.0 ??с???????????????ゃ??紊?????????障???????с????????

 $ ruby -v
 => ruby 2.0.0p326 (2013-10-05 revision 43144) [x86_64-darwin13.0.0]
 $ ruby -rstringio -e "Encoding.default_internal = Encoding::UTF_8; p StringIO.new(File.read('x.jpg')).readbyte"
 => 255
 $ ruby -rstringio -e "Encoding.default_internal = Encoding::UTF_8; p StringIO.new(File.read('x.jpg').force_encoding('UTF-8').encode\!).readbyte"
 => 255

rails ??荅峨?膊??????? rails4 ??с???????????????茵???c?????????с????????障?障????? post ??х?糸????????????????????????????????障????障?????

rails ???潟?若?????????????????????File.binread ???篏帥?c?茯??粋昭?????с?????????????????????????????????????????????????с?????

=end


-- 
http://bugs.ruby-lang.org/