[#40961] [Bug #3137] complex.rb changes exceptions of Math — Yusuke Endoh <redmine@...>

Bug #3137: complex.rb changes exceptions of Math

15 messages 2010/04/12

[#41038] Windows と DL が使用条件の libffi — Aaron Patterson <aaron.patterson@...>

こんにちは!アーロンです。

17 messages 2010/04/22
[#41039] Re: Windows と DL が使用条件の libffi — "U.Nakamura" <usa@...> 2010/04/22

こんにちは、なかむら(う)です。

[#41040] Re: Windows と DL が使用条件の libffi — "NARUSE, Yui" <naruse@...> 2010/04/22

成瀬です。

[#41059] Re: Windows と DL が使用条件の libffi — Aaron Patterson <aaron.patterson@...> 2010/04/26

2010/4/21 NARUSE, Yui <naruse@airemix.jp>:

[#41060] Re: Windows と DL が使用条件の libffi — Yugui <yugui@...> 2010/04/26

2010/4/26 Aaron Patterson <aaron.patterson@gmail.com>:

[#41067] [Feature #3203] LazySweepGC patch — Narihiro Nakamura <redmine@...>

Feature #3203: LazySweepGC patch

15 messages 2010/04/26
[#41069] Re: [Feature #3203] LazySweepGC patch — Yusuke ENDOH <mame@...> 2010/04/27

遠藤です。

[#41104] Rails3 M17N — Yukihiro Matsumoto <matz@...>

まつもと ゆきひろです

29 messages 2010/04/30
[#41111] Re: Rails3 M17N — Urabe Shyouhei <shyouhei@...> 2010/04/30

Yukihiro Matsumoto さんは書きました:

[#41113] Re: Rails3 M17N — Yukihiro Matsumoto <matz@...> 2010/04/30

まつもと ゆきひろです

[ruby-dev:41024] [Bug #3180] getc with text mode breaks incomplete character immediately before EOF

From: Yusuke Endoh <redmine@...>
Date: 2010-04-20 13:09:10 UTC
List: ruby-dev #41024
Bug #3180: getc with text mode breaks incomplete character immediately before EOF
http://redmine.ruby-lang.org/issues/show/3180

起票者: Yusuke Endoh
ステータス: Open, 優先度: Normal
担当者: Yui NARUSE, カテゴリ: M17N, Target version: 1.9.2
ruby -v: ruby 1.9.2dev (2010-04-20 trunk 27405) [i686-linux] 

遠藤です。

  # coding: UTF-8
  # "う" の途中で切れた中途半端なファイルを作る
  s = "あいうえお".force_encoding("ASCII-8BIT")
  open("foo.txt", "wb") {|f| f.write(s[0, 8]) }

  # IO#read で一気に読めば期待通り
  open("foo.txt", "rt") {|f| p f.read } #=> "あい\xE3\x81"

  # UTF-8 を明示すると UTF-8 になるが、最後の文字が化ける
  open("foo.txt", "rt:UTF-8") {|f| p f.chars.to_a }
    #=> ["あ", "い", "\u0000\u0000"]

LANG は ja_JP.UTF-8 です。

incomplete な文字が "\0\0" に化けるのは意図的でしょうか。
期待としては、["あ", "い", "\xE3", "\x81"] です。

-- 
Yusuke Endoh <mame@tsg.ne.jp>


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

In This Thread

Prev Next