Issue #6266 has been reported by jonforums (Jon Forums). ---------------------------------------- Bug #6266: encoding related exception with recent integrated psych https://bugs.ruby-lang.org/issues/6266 Author: jonforums (Jon Forums) Status: Open Priority: Normal Assignee: tenderlovemaking (Aaron Patterson) Category: ext Target version: 1.9.3 ruby -v: ruby 1.9.3p176 (2012-04-04 revision 35238) [i386-mingw32] Newer versions of Psych integrated into both ruby_1_9_3 and trunk create exceptions if the yaml file isn't perceived to be correctly encoded. While I discovered this in my code that uses the 'logging' gem on Win7 32bit, this test snippet shows the same failure on both ruby_1_9_3@r35238 and trunk@r35229: # hello.yml uses LF-only line endings C:\temp>type hello.yml :greeting: hello yaml # yaml_test.rb uses LF-only C:\temp>type yaml_test.rb require 'yaml' puts "YAML engine: #{YAML::ENGINE.yamler} #{'v'+Psych::VERSION if defined?(Psych)}" # fix: 'rb' # fix: 'r:utf-8' # fix: Encoding.default_external = Encoding::UTF_8 if defined?(Encoding) # fix: chcp 65001 in cmd.exe before running script # fix: run script with ruby -Eutf-8 File.open('hello.yml', 'r') do |f| puts YAML.load_stream(f) end # IBM437 codepage is a typical default for the cmd.exe shell C:\temp>chcp Active code page: 437 C:\temp>ruby -v yaml_test.rb ruby 1.9.3p176 (2012-04-04 revision 35238) [i386-mingw32] YAML engine: psych v1.3.1 C:/ruby193/lib/ruby/1.9.1/psych.rb:206:in `parse': YAML file must be UTF-8, UTF-16LE, or UTF-16BE, not IBM437 (ArgumentError) from C:/ruby193/lib/ruby/1.9.1/psych.rb:206:in `parse_stream' from C:/ruby193/lib/ruby/1.9.1/psych.rb:289:in `load_stream' from yaml_test.rb:10:in `block in <main>' from yaml_test.rb:9:in `open' from yaml_test.rb:9:in `<main>' # older versions of integrated psych do not cause exceptions C:\temp>chcp Active code page: 437 C:\temp>ruby -v yaml_test.rb tcs-ruby 1.9.3p134 (2012-02-19, TCS patched 2012-02-25) [i386-mingw32] YAML engine: psych v1.2.2 {:greeting=>"hello yaml"} I've not tried on Arch with bash. From the `test_yaml.rb` comments you can see some of the workarounds. None of these are good options because they require changes to either a users code/yaml, gem code that uses the psych library, or the ruby invocation command line. For both trunk and ruby_1_9_3, I'd prefer psych implement a fallback strategy that Just Works combined with an informative warning rather than a hard exception.
on 2012-04-06 18:13
on 2012-04-06 23:32
Issue #6266 has been updated by jonforums (Jon Forums).
On Arch (3.2.14-1-ARCH) the sample also exceptions when I change my
locale to en_US.iso88591 from en_US.utf8.
But on trunk it doesn't matter anymore :)
$ ruby -v yaml_test.rb
ruby 2.0.0dev (2012-04-07 trunk 35247) [i686-linux]
YAML engine: psych v1.3.1
{:greeting=>"hello yaml"}
...and trunk looks good on Win7 32bit
C:\temp>chcp
Active code page: 437
C:\temp>ruby -v yaml_test.rb
ruby 2.0.0dev (2012-04-07 trunk 35247) [i386-mingw32]
YAML engine: psych v1.3.1
{:greeting=>"hello yaml"}
Speedy...thanks! I'll fetch ruby_1_9_3 later and double check.
----------------------------------------
Bug #6266: encoding related exception with recent integrated psych
https://bugs.ruby-lang.org/issues/6266#change-25689
Author: jonforums (Jon Forums)
Status: Open
Priority: Normal
Assignee: tenderlovemaking (Aaron Patterson)
Category: ext
Target version: 1.9.3
ruby -v: ruby 1.9.3p176 (2012-04-04 revision 35238) [i386-mingw32]
Newer versions of Psych integrated into both ruby_1_9_3 and trunk create
exceptions if the yaml file isn't perceived to be correctly encoded.
While I discovered this in my code that uses the 'logging' gem on Win7
32bit, this test snippet shows the same failure on both
ruby_1_9_3@r35238 and trunk@r35229:
# hello.yml uses LF-only line endings
C:\temp>type hello.yml
:greeting: hello yaml
# yaml_test.rb uses LF-only
C:\temp>type yaml_test.rb
require 'yaml'
puts "YAML engine: #{YAML::ENGINE.yamler} #{'v'+Psych::VERSION if
defined?(Psych)}"
# fix: 'rb'
# fix: 'r:utf-8'
# fix: Encoding.default_external = Encoding::UTF_8 if
defined?(Encoding)
# fix: chcp 65001 in cmd.exe before running script
# fix: run script with ruby -Eutf-8
File.open('hello.yml', 'r') do |f|
puts YAML.load_stream(f)
end
# IBM437 codepage is a typical default for the cmd.exe shell
C:\temp>chcp
Active code page: 437
C:\temp>ruby -v yaml_test.rb
ruby 1.9.3p176 (2012-04-04 revision 35238) [i386-mingw32]
YAML engine: psych v1.3.1
C:/ruby193/lib/ruby/1.9.1/psych.rb:206:in `parse': YAML file must be
UTF-8, UTF-16LE, or UTF-16BE, not IBM437 (ArgumentError)
from C:/ruby193/lib/ruby/1.9.1/psych.rb:206:in `parse_stream'
from C:/ruby193/lib/ruby/1.9.1/psych.rb:289:in `load_stream'
from yaml_test.rb:10:in `block in <main>'
from yaml_test.rb:9:in `open'
from yaml_test.rb:9:in `<main>'
# older versions of integrated psych do not cause exceptions
C:\temp>chcp
Active code page: 437
C:\temp>ruby -v yaml_test.rb
tcs-ruby 1.9.3p134 (2012-02-19, TCS patched 2012-02-25) [i386-mingw32]
YAML engine: psych v1.2.2
{:greeting=>"hello yaml"}
I've not tried on Arch with bash.
From the `test_yaml.rb` comments you can see some of the workarounds.
None of these are good options because they require changes to either a
users code/yaml, gem code that uses the psych library, or the ruby
invocation command line.
For both trunk and ruby_1_9_3, I'd prefer psych implement a fallback
strategy that Just Works combined with an informative warning rather
than a hard exception.
on 2012-04-07 03:24
On Sat, Apr 07, 2012 at 06:31:25AM +0900, jonforums (Jon Forums) wrote: > YAML engine: psych v1.3.1 > {:greeting=>"hello yaml"} > > Speedy...thanks! I'll fetch ruby_1_9_3 later and double check. I need to backport the fix to ruby_1_9_3 first. :-) I'll put together the patches for the 1.9.3 branch and open a ticket to backport. Thanks for testing!
on 2012-04-17 14:20
Issue #6266 has been updated by mame (Yusuke Endoh). Status changed from Open to Assigned ---------------------------------------- Bug #6266: encoding related exception with recent integrated psych https://bugs.ruby-lang.org/issues/6266#change-25963 Author: jonforums (Jon Forums) Status: Assigned Priority: Normal Assignee: tenderlovemaking (Aaron Patterson) Category: ext Target version: 1.9.3 ruby -v: ruby 1.9.3p176 (2012-04-04 revision 35238) [i386-mingw32] Newer versions of Psych integrated into both ruby_1_9_3 and trunk create exceptions if the yaml file isn't perceived to be correctly encoded. While I discovered this in my code that uses the 'logging' gem on Win7 32bit, this test snippet shows the same failure on both ruby_1_9_3@r35238 and trunk@r35229: # hello.yml uses LF-only line endings C:\temp>type hello.yml :greeting: hello yaml # yaml_test.rb uses LF-only C:\temp>type yaml_test.rb require 'yaml' puts "YAML engine: #{YAML::ENGINE.yamler} #{'v'+Psych::VERSION if defined?(Psych)}" # fix: 'rb' # fix: 'r:utf-8' # fix: Encoding.default_external = Encoding::UTF_8 if defined?(Encoding) # fix: chcp 65001 in cmd.exe before running script # fix: run script with ruby -Eutf-8 File.open('hello.yml', 'r') do |f| puts YAML.load_stream(f) end # IBM437 codepage is a typical default for the cmd.exe shell C:\temp>chcp Active code page: 437 C:\temp>ruby -v yaml_test.rb ruby 1.9.3p176 (2012-04-04 revision 35238) [i386-mingw32] YAML engine: psych v1.3.1 C:/ruby193/lib/ruby/1.9.1/psych.rb:206:in `parse': YAML file must be UTF-8, UTF-16LE, or UTF-16BE, not IBM437 (ArgumentError) from C:/ruby193/lib/ruby/1.9.1/psych.rb:206:in `parse_stream' from C:/ruby193/lib/ruby/1.9.1/psych.rb:289:in `load_stream' from yaml_test.rb:10:in `block in <main>' from yaml_test.rb:9:in `open' from yaml_test.rb:9:in `<main>' # older versions of integrated psych do not cause exceptions C:\temp>chcp Active code page: 437 C:\temp>ruby -v yaml_test.rb tcs-ruby 1.9.3p134 (2012-02-19, TCS patched 2012-02-25) [i386-mingw32] YAML engine: psych v1.2.2 {:greeting=>"hello yaml"} I've not tried on Arch with bash. From the `test_yaml.rb` comments you can see some of the workarounds. None of these are good options because they require changes to either a users code/yaml, gem code that uses the psych library, or the ruby invocation command line. For both trunk and ruby_1_9_3, I'd prefer psych implement a fallback strategy that Just Works combined with an informative warning rather than a hard exception.
on 2012-04-17 14:58
Issue #6266 has been updated by jonforums (Jon Forums). r35245 fixed this issue, and r35251 backported to ruby_1_9_3 ---------------------------------------- Bug #6266: encoding related exception with recent integrated psych https://bugs.ruby-lang.org/issues/6266#change-25968 Author: jonforums (Jon Forums) Status: Assigned Priority: Normal Assignee: tenderlovemaking (Aaron Patterson) Category: ext Target version: 1.9.3 ruby -v: ruby 1.9.3p176 (2012-04-04 revision 35238) [i386-mingw32] Newer versions of Psych integrated into both ruby_1_9_3 and trunk create exceptions if the yaml file isn't perceived to be correctly encoded. While I discovered this in my code that uses the 'logging' gem on Win7 32bit, this test snippet shows the same failure on both ruby_1_9_3@r35238 and trunk@r35229: # hello.yml uses LF-only line endings C:\temp>type hello.yml :greeting: hello yaml # yaml_test.rb uses LF-only C:\temp>type yaml_test.rb require 'yaml' puts "YAML engine: #{YAML::ENGINE.yamler} #{'v'+Psych::VERSION if defined?(Psych)}" # fix: 'rb' # fix: 'r:utf-8' # fix: Encoding.default_external = Encoding::UTF_8 if defined?(Encoding) # fix: chcp 65001 in cmd.exe before running script # fix: run script with ruby -Eutf-8 File.open('hello.yml', 'r') do |f| puts YAML.load_stream(f) end # IBM437 codepage is a typical default for the cmd.exe shell C:\temp>chcp Active code page: 437 C:\temp>ruby -v yaml_test.rb ruby 1.9.3p176 (2012-04-04 revision 35238) [i386-mingw32] YAML engine: psych v1.3.1 C:/ruby193/lib/ruby/1.9.1/psych.rb:206:in `parse': YAML file must be UTF-8, UTF-16LE, or UTF-16BE, not IBM437 (ArgumentError) from C:/ruby193/lib/ruby/1.9.1/psych.rb:206:in `parse_stream' from C:/ruby193/lib/ruby/1.9.1/psych.rb:289:in `load_stream' from yaml_test.rb:10:in `block in <main>' from yaml_test.rb:9:in `open' from yaml_test.rb:9:in `<main>' # older versions of integrated psych do not cause exceptions C:\temp>chcp Active code page: 437 C:\temp>ruby -v yaml_test.rb tcs-ruby 1.9.3p134 (2012-02-19, TCS patched 2012-02-25) [i386-mingw32] YAML engine: psych v1.2.2 {:greeting=>"hello yaml"} I've not tried on Arch with bash. From the `test_yaml.rb` comments you can see some of the workarounds. None of these are good options because they require changes to either a users code/yaml, gem code that uses the psych library, or the ruby invocation command line. For both trunk and ruby_1_9_3, I'd prefer psych implement a fallback strategy that Just Works combined with an informative warning rather than a hard exception.
on 2012-04-17 15:07
Issue #6266 has been updated by mame (Yusuke Endoh). Status changed from Assigned to Closed Okay, closing. Thanks! -- Yusuke Endoh <mame@tsg.ne.jp> ---------------------------------------- Bug #6266: encoding related exception with recent integrated psych https://bugs.ruby-lang.org/issues/6266#change-25969 Author: jonforums (Jon Forums) Status: Closed Priority: Normal Assignee: tenderlovemaking (Aaron Patterson) Category: ext Target version: 1.9.3 ruby -v: ruby 1.9.3p176 (2012-04-04 revision 35238) [i386-mingw32] Newer versions of Psych integrated into both ruby_1_9_3 and trunk create exceptions if the yaml file isn't perceived to be correctly encoded. While I discovered this in my code that uses the 'logging' gem on Win7 32bit, this test snippet shows the same failure on both ruby_1_9_3@r35238 and trunk@r35229: # hello.yml uses LF-only line endings C:\temp>type hello.yml :greeting: hello yaml # yaml_test.rb uses LF-only C:\temp>type yaml_test.rb require 'yaml' puts "YAML engine: #{YAML::ENGINE.yamler} #{'v'+Psych::VERSION if defined?(Psych)}" # fix: 'rb' # fix: 'r:utf-8' # fix: Encoding.default_external = Encoding::UTF_8 if defined?(Encoding) # fix: chcp 65001 in cmd.exe before running script # fix: run script with ruby -Eutf-8 File.open('hello.yml', 'r') do |f| puts YAML.load_stream(f) end # IBM437 codepage is a typical default for the cmd.exe shell C:\temp>chcp Active code page: 437 C:\temp>ruby -v yaml_test.rb ruby 1.9.3p176 (2012-04-04 revision 35238) [i386-mingw32] YAML engine: psych v1.3.1 C:/ruby193/lib/ruby/1.9.1/psych.rb:206:in `parse': YAML file must be UTF-8, UTF-16LE, or UTF-16BE, not IBM437 (ArgumentError) from C:/ruby193/lib/ruby/1.9.1/psych.rb:206:in `parse_stream' from C:/ruby193/lib/ruby/1.9.1/psych.rb:289:in `load_stream' from yaml_test.rb:10:in `block in <main>' from yaml_test.rb:9:in `open' from yaml_test.rb:9:in `<main>' # older versions of integrated psych do not cause exceptions C:\temp>chcp Active code page: 437 C:\temp>ruby -v yaml_test.rb tcs-ruby 1.9.3p134 (2012-02-19, TCS patched 2012-02-25) [i386-mingw32] YAML engine: psych v1.2.2 {:greeting=>"hello yaml"} I've not tried on Arch with bash. From the `test_yaml.rb` comments you can see some of the workarounds. None of these are good options because they require changes to either a users code/yaml, gem code that uses the psych library, or the ruby invocation command line. For both trunk and ruby_1_9_3, I'd prefer psych implement a fallback strategy that Just Works combined with an informative warning rather than a hard exception.
on 2012-10-19 08:00
Issue #6266 has been updated by elninorian (menuju sukses sukses). http://www.howtogetaflatstomachforgirls.com/ http://www.howtogetaflatstomachforgirls.com/lose-w... http://www.howtogetaflatstomachforgirls.com/uncate... http://www.howtogetaflatstomachforgirls.com/diet/d... http://www.howtogetaflatstomachforgirls.com/belly-... http://www.howtogetaflatstomachforgirls.com/flat-b... http://www.howtogetaflatstomachforgirls.com/flat-s... http://www.howtogetaflatstomachforgirls.com/have-a... http://www.howtogetaflatstomachforgirls.com/weight... http://www.howtogetaflatstomachforgirls.com/exerci... http://www.howtogetaflatstomachforgirls.com/weight... http://www.howtogetaflatstomachforgirls.com/diet/k... http://www.howtogetaflatstomachforgirls.com/lose-p... http://www.howtogetaflatstomachforgirls.com/belly-... http://www.howtogetaflatstomachforgirls.com/flat-s... http://www.howtogetaflatstomachforgirls.com/a-flat... http://www.howtogetaflatstomachforgirls.com/belly-... http://www.howtogetaflatstomachforgirls.com/abs/ho... http://www.howtogetaflatstomachforgirls.com/flat-s... http://www.howtogetaflatstomachforgirls.com/flat-b... http://www.howtogetaflatstomachforgirls.com/exerci... http://www.howtogetaflatstomachforgirls.com/a-flat... http://www.howtogetaflatstomachforgirls.com/flat-s... http://www.howtogetaflatstomachforgirls.com/cardio... http://www.howtogetaflatstomachforgirls.com/bonus-... http://www.howtogetaflatstomachforgirls.com/flat-s... http://www.howtogetaflatstomachforgirls.com/flat-s... http://www.howtogetaflatstomachforgirls.com/abs/ho... http://www.howtogetaflatstomachforgirls.com/weight... http://www.howtogetaflatstomachforgirls.com/stomac... http://www.howtogetaflatstomachforgirls.com/secret... http://www.howtogetaflatstomachforgirls.com/exerci... http://www.howtogetaflatstomachforgirls.com/to-get... http://www.howtogetaflatstomachforgirls.com/tips-f... http://www.howtogetaflatstomachforgirls.com/flat-s... http://www.howtogetaflatstomachforgirls.com/a-flat... http://www.howtogetaflatstomachforgirls.com/belly-... http://www.howtogetaflatstomachforgirls.com/flat-b... http://www.howtogetaflatstomachforgirls.com/weight... http://www.howtogetaflatstomachforgirls.com/diet/m... http://www.howtogetaflatstomachforgirls.com/weight... http://www.howtogetaflatstomachforgirls.com/belly-... http://www.howtogetaflatstomachforgirls.com/belly-... http://www.howtogetaflatstomachforgirls.com/how-to... http://www.howtogetaflatstomachforgirls.com/flat-s... http://www.howtogetaflatstomachforgirls.com/flat-s... http://www.howtogetaflatstomachforgirls.com/how-do... http://www.fatburningfoodsformen1.com/belly-fat-ex... http://www.fatburningfoodsformen1.com/abs-exercise... http://www.fatburningfoodsformen1.com/green-tea-bu... http://www.fatburningfoodsformen1.com/belly-fat-ex... http://www.fatburningfoodsformen1.com/the-man-diet... ---------------------------------------- Bug #6266: encoding related exception with recent integrated psych https://bugs.ruby-lang.org/issues/6266#change-31056 Author: jonforums (Jon Forums) Status: Closed Priority: Normal Assignee: tenderlovemaking (Aaron Patterson) Category: ext Target version: 1.9.3 ruby -v: ruby 1.9.3p176 (2012-04-04 revision 35238) [i386-mingw32] Newer versions of Psych integrated into both ruby_1_9_3 and trunk create exceptions if the yaml file isn't perceived to be correctly encoded. While I discovered this in my code that uses the 'logging' gem on Win7 32bit, this test snippet shows the same failure on both ruby_1_9_3@r35238 and trunk@r35229: # hello.yml uses LF-only line endings C:\temp>type hello.yml :greeting: hello yaml # yaml_test.rb uses LF-only C:\temp>type yaml_test.rb require 'yaml' puts "YAML engine: #{YAML::ENGINE.yamler} #{'v'+Psych::VERSION if defined?(Psych)}" # fix: 'rb' # fix: 'r:utf-8' # fix: Encoding.default_external = Encoding::UTF_8 if defined?(Encoding) # fix: chcp 65001 in cmd.exe before running script # fix: run script with ruby -Eutf-8 File.open('hello.yml', 'r') do |f| puts YAML.load_stream(f) end # IBM437 codepage is a typical default for the cmd.exe shell C:\temp>chcp Active code page: 437 C:\temp>ruby -v yaml_test.rb ruby 1.9.3p176 (2012-04-04 revision 35238) [i386-mingw32] YAML engine: psych v1.3.1 C:/ruby193/lib/ruby/1.9.1/psych.rb:206:in `parse': YAML file must be UTF-8, UTF-16LE, or UTF-16BE, not IBM437 (ArgumentError) from C:/ruby193/lib/ruby/1.9.1/psych.rb:206:in `parse_stream' from C:/ruby193/lib/ruby/1.9.1/psych.rb:289:in `load_stream' from yaml_test.rb:10:in `block in <main>' from yaml_test.rb:9:in `open' from yaml_test.rb:9:in `<main>' # older versions of integrated psych do not cause exceptions C:\temp>chcp Active code page: 437 C:\temp>ruby -v yaml_test.rb tcs-ruby 1.9.3p134 (2012-02-19, TCS patched 2012-02-25) [i386-mingw32] YAML engine: psych v1.2.2 {:greeting=>"hello yaml"} I've not tried on Arch with bash. From the `test_yaml.rb` comments you can see some of the workarounds. None of these are good options because they require changes to either a users code/yaml, gem code that uses the psych library, or the ruby invocation command line. For both trunk and ruby_1_9_3, I'd prefer psych implement a fallback strategy that Just Works combined with an informative warning rather than a hard exception.
on 2012-10-23 08:07
Issue #6266 has been updated by danikuri (dani harisy). Everlastingly, an issue with the intention of I am passionate in this vicinity. I be inflicted with looked for in rank of this feature for the last numerous hours. Your locate is greatly valued. http://www.yourhousecontents.com/ http://www.electroscanogram.com/ http://www.videophototravel.info/ http://www.supershinelaundry.com/ http://www.ywor.info/ http://www.bicity.info/ http://www.ubidyne.info/ ---------------------------------------- Bug #6266: encoding related exception with recent integrated psych https://bugs.ruby-lang.org/issues/6266#change-31330 Author: jonforums (Jon Forums) Status: Closed Priority: Normal Assignee: tenderlovemaking (Aaron Patterson) Category: ext Target version: 1.9.3 ruby -v: ruby 1.9.3p176 (2012-04-04 revision 35238) [i386-mingw32] Newer versions of Psych integrated into both ruby_1_9_3 and trunk create exceptions if the yaml file isn't perceived to be correctly encoded. While I discovered this in my code that uses the 'logging' gem on Win7 32bit, this test snippet shows the same failure on both ruby_1_9_3@r35238 and trunk@r35229: # hello.yml uses LF-only line endings C:\temp>type hello.yml :greeting: hello yaml # yaml_test.rb uses LF-only C:\temp>type yaml_test.rb require 'yaml' puts "YAML engine: #{YAML::ENGINE.yamler} #{'v'+Psych::VERSION if defined?(Psych)}" # fix: 'rb' # fix: 'r:utf-8' # fix: Encoding.default_external = Encoding::UTF_8 if defined?(Encoding) # fix: chcp 65001 in cmd.exe before running script # fix: run script with ruby -Eutf-8 File.open('hello.yml', 'r') do |f| puts YAML.load_stream(f) end # IBM437 codepage is a typical default for the cmd.exe shell C:\temp>chcp Active code page: 437 C:\temp>ruby -v yaml_test.rb ruby 1.9.3p176 (2012-04-04 revision 35238) [i386-mingw32] YAML engine: psych v1.3.1 C:/ruby193/lib/ruby/1.9.1/psych.rb:206:in `parse': YAML file must be UTF-8, UTF-16LE, or UTF-16BE, not IBM437 (ArgumentError) from C:/ruby193/lib/ruby/1.9.1/psych.rb:206:in `parse_stream' from C:/ruby193/lib/ruby/1.9.1/psych.rb:289:in `load_stream' from yaml_test.rb:10:in `block in <main>' from yaml_test.rb:9:in `open' from yaml_test.rb:9:in `<main>' # older versions of integrated psych do not cause exceptions C:\temp>chcp Active code page: 437 C:\temp>ruby -v yaml_test.rb tcs-ruby 1.9.3p134 (2012-02-19, TCS patched 2012-02-25) [i386-mingw32] YAML engine: psych v1.2.2 {:greeting=>"hello yaml"} I've not tried on Arch with bash. From the `test_yaml.rb` comments you can see some of the workarounds. None of these are good options because they require changes to either a users code/yaml, gem code that uses the psych library, or the ruby invocation command line. For both trunk and ruby_1_9_3, I'd prefer psych implement a fallback strategy that Just Works combined with an informative warning rather than a hard exception.
on 2012-11-22 03:31
Issue #6266 has been updated by lancel (lancel lancel). =begin All of us have read the stories of excite people's ((<lancel|URL:http://www.lancel1.com/>)) mind, the hero of the story to live only for a very limited time, sometimes up to a year, sometimes as short as one day. But we always want to know, the doomed choose how to spend their ((<sac lancel|URL:http://www.lancel1.com/>)) last days. Of course, I say is of free men who have a choice, not whose sphere of activities is strictly.458gyu854 =end ---------------------------------------- Bug #6266: encoding related exception with recent integrated psych https://bugs.ruby-lang.org/issues/6266#change-33431 Author: jonforums (Jon Forums) Status: Closed Priority: Normal Assignee: tenderlovemaking (Aaron Patterson) Category: ext Target version: 1.9.3 ruby -v: ruby 1.9.3p176 (2012-04-04 revision 35238) [i386-mingw32] Newer versions of Psych integrated into both ruby_1_9_3 and trunk create exceptions if the yaml file isn't perceived to be correctly encoded. While I discovered this in my code that uses the 'logging' gem on Win7 32bit, this test snippet shows the same failure on both ruby_1_9_3@r35238 and trunk@r35229: # hello.yml uses LF-only line endings C:\temp>type hello.yml :greeting: hello yaml # yaml_test.rb uses LF-only C:\temp>type yaml_test.rb require 'yaml' puts "YAML engine: #{YAML::ENGINE.yamler} #{'v'+Psych::VERSION if defined?(Psych)}" # fix: 'rb' # fix: 'r:utf-8' # fix: Encoding.default_external = Encoding::UTF_8 if defined?(Encoding) # fix: chcp 65001 in cmd.exe before running script # fix: run script with ruby -Eutf-8 File.open('hello.yml', 'r') do |f| puts YAML.load_stream(f) end # IBM437 codepage is a typical default for the cmd.exe shell C:\temp>chcp Active code page: 437 C:\temp>ruby -v yaml_test.rb ruby 1.9.3p176 (2012-04-04 revision 35238) [i386-mingw32] YAML engine: psych v1.3.1 C:/ruby193/lib/ruby/1.9.1/psych.rb:206:in `parse': YAML file must be UTF-8, UTF-16LE, or UTF-16BE, not IBM437 (ArgumentError) from C:/ruby193/lib/ruby/1.9.1/psych.rb:206:in `parse_stream' from C:/ruby193/lib/ruby/1.9.1/psych.rb:289:in `load_stream' from yaml_test.rb:10:in `block in <main>' from yaml_test.rb:9:in `open' from yaml_test.rb:9:in `<main>' # older versions of integrated psych do not cause exceptions C:\temp>chcp Active code page: 437 C:\temp>ruby -v yaml_test.rb tcs-ruby 1.9.3p134 (2012-02-19, TCS patched 2012-02-25) [i386-mingw32] YAML engine: psych v1.2.2 {:greeting=>"hello yaml"} I've not tried on Arch with bash. From the `test_yaml.rb` comments you can see some of the workarounds. None of these are good options because they require changes to either a users code/yaml, gem code that uses the psych library, or the ruby invocation command line. For both trunk and ruby_1_9_3, I'd prefer psych implement a fallback strategy that Just Works combined with an informative warning rather than a hard exception.
on 2012-11-22 07:33
Issue #6266 has been updated by uggsoutlet (uggsoutlet uggsoutlet). =begin would be an excellent rule. Such an attitude would emphasize ((<uggs on sale|URL:http://www.gooduggboots.org/>)) sharply the value of life. Every day we should with gentleness, vigor, hold ((<cheap ugg boots|URL:http://www.gooduggboots.org/>)) the heart of thanksgiving to life. But when the time for endless days, months and years passed in ((<uggs outlet|URL:http://www.gooduggboots.org/>)) front of us, we are often not the seed feeling. Of course, there is also " eat, drink, enjoy .458gyu854 =end ---------------------------------------- Bug #6266: encoding related exception with recent integrated psych https://bugs.ruby-lang.org/issues/6266#change-33486 Author: jonforums (Jon Forums) Status: Closed Priority: Normal Assignee: tenderlovemaking (Aaron Patterson) Category: ext Target version: 1.9.3 ruby -v: ruby 1.9.3p176 (2012-04-04 revision 35238) [i386-mingw32] Newer versions of Psych integrated into both ruby_1_9_3 and trunk create exceptions if the yaml file isn't perceived to be correctly encoded. While I discovered this in my code that uses the 'logging' gem on Win7 32bit, this test snippet shows the same failure on both ruby_1_9_3@r35238 and trunk@r35229: # hello.yml uses LF-only line endings C:\temp>type hello.yml :greeting: hello yaml # yaml_test.rb uses LF-only C:\temp>type yaml_test.rb require 'yaml' puts "YAML engine: #{YAML::ENGINE.yamler} #{'v'+Psych::VERSION if defined?(Psych)}" # fix: 'rb' # fix: 'r:utf-8' # fix: Encoding.default_external = Encoding::UTF_8 if defined?(Encoding) # fix: chcp 65001 in cmd.exe before running script # fix: run script with ruby -Eutf-8 File.open('hello.yml', 'r') do |f| puts YAML.load_stream(f) end # IBM437 codepage is a typical default for the cmd.exe shell C:\temp>chcp Active code page: 437 C:\temp>ruby -v yaml_test.rb ruby 1.9.3p176 (2012-04-04 revision 35238) [i386-mingw32] YAML engine: psych v1.3.1 C:/ruby193/lib/ruby/1.9.1/psych.rb:206:in `parse': YAML file must be UTF-8, UTF-16LE, or UTF-16BE, not IBM437 (ArgumentError) from C:/ruby193/lib/ruby/1.9.1/psych.rb:206:in `parse_stream' from C:/ruby193/lib/ruby/1.9.1/psych.rb:289:in `load_stream' from yaml_test.rb:10:in `block in <main>' from yaml_test.rb:9:in `open' from yaml_test.rb:9:in `<main>' # older versions of integrated psych do not cause exceptions C:\temp>chcp Active code page: 437 C:\temp>ruby -v yaml_test.rb tcs-ruby 1.9.3p134 (2012-02-19, TCS patched 2012-02-25) [i386-mingw32] YAML engine: psych v1.2.2 {:greeting=>"hello yaml"} I've not tried on Arch with bash. From the `test_yaml.rb` comments you can see some of the workarounds. None of these are good options because they require changes to either a users code/yaml, gem code that uses the psych library, or the ruby invocation command line. For both trunk and ruby_1_9_3, I'd prefer psych implement a fallback strategy that Just Works combined with an informative warning rather than a hard exception.
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.