mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ruby.c (load_file_internal): set default source encoding as
UTF-8 instead of US-ASCII. [ruby-core:46021] [Feature #6679] * parse.y (parser_initialize): set default parser encoding as UTF-8 instead of US-ASCII. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c9fc6b08ae
commit
58ef0f06c6
24 changed files with 32 additions and 6 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
Tue Nov 6 09:37:57 2012 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
|
* ruby.c (load_file_internal): set default source encoding as
|
||||||
|
UTF-8 instead of US-ASCII. [ruby-core:46021] [Feature #6679]
|
||||||
|
|
||||||
|
* parse.y (parser_initialize): set default parser encoding as
|
||||||
|
UTF-8 instead of US-ASCII.
|
||||||
|
|
||||||
Tue Nov 6 05:48:06 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
|
Tue Nov 6 05:48:06 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
|
||||||
|
|
||||||
* test/ruby/test_require.rb
|
* test/ruby/test_require.rb
|
||||||
|
|
2
NEWS
2
NEWS
|
@ -248,6 +248,8 @@ with all sufficient information, see the ChangeLog file.
|
||||||
|
|
||||||
* Added %i and %I for symbol list creation (similar to %w and %W).
|
* Added %i and %I for symbol list creation (similar to %w and %W).
|
||||||
|
|
||||||
|
* Default source encoding is changed to UTF-8. (was US-ASCII)
|
||||||
|
|
||||||
=== Compatibility issues (excluding feature bug fixes)
|
=== Compatibility issues (excluding feature bug fixes)
|
||||||
|
|
||||||
* Signal.trap
|
* Signal.trap
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# coding: US-ASCII
|
||||||
module REXML
|
module REXML
|
||||||
module Encoding
|
module Encoding
|
||||||
# ID ---> Encoding name
|
# ID ---> Encoding name
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# coding: US-ASCII
|
||||||
require 'rexml/encoding'
|
require 'rexml/encoding'
|
||||||
|
|
||||||
module REXML
|
module REXML
|
||||||
|
|
2
parse.y
2
parse.y
|
@ -10580,7 +10580,7 @@ parser_initialize(struct parser_params *parser)
|
||||||
#ifdef YYMALLOC
|
#ifdef YYMALLOC
|
||||||
parser->heap = NULL;
|
parser->heap = NULL;
|
||||||
#endif
|
#endif
|
||||||
parser->enc = rb_usascii_encoding();
|
parser->enc = rb_utf8_encoding();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef RIPPER
|
#ifdef RIPPER
|
||||||
|
|
2
ruby.c
2
ruby.c
|
@ -1692,7 +1692,7 @@ load_file_internal(VALUE arg)
|
||||||
enc = rb_locale_encoding();
|
enc = rb_locale_encoding();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
enc = rb_usascii_encoding();
|
enc = rb_utf8_encoding();
|
||||||
}
|
}
|
||||||
if (NIL_P(f)) {
|
if (NIL_P(f)) {
|
||||||
f = rb_str_new(0, 0);
|
f = rb_str_new(0, 0);
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# coding: US-ASCII
|
||||||
require "test/unit"
|
require "test/unit"
|
||||||
require "base64"
|
require "base64"
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# coding: US-ASCII
|
||||||
require_relative 'test_base'
|
require_relative 'test_base'
|
||||||
require 'dl/import'
|
require 'dl/import'
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# coding: US-ASCII
|
||||||
require 'test/unit'
|
require 'test/unit'
|
||||||
require 'logger'
|
require 'logger'
|
||||||
require 'tempfile'
|
require 'tempfile'
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# $Id$
|
# coding: US-ASCII
|
||||||
|
|
||||||
require 'test/unit'
|
require 'test/unit'
|
||||||
require 'net/http'
|
require 'net/http'
|
||||||
require 'stringio'
|
require 'stringio'
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# coding: US-ASCII
|
||||||
require 'net/http'
|
require 'net/http'
|
||||||
require 'test/unit'
|
require 'test/unit'
|
||||||
require 'stringio'
|
require 'stringio'
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# coding: US-ASCII
|
||||||
require_relative 'utils'
|
require_relative 'utils'
|
||||||
|
|
||||||
if defined?(OpenSSL)
|
if defined?(OpenSSL)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# -*- mode: ruby; ruby-indent-level: 4; tab-width: 4 -*-
|
# -*- coding: us-ascii; mode: ruby; ruby-indent-level: 4; tab-width: 4 -*-
|
||||||
# vim:sw=4:ts=4
|
# vim:sw=4:ts=4
|
||||||
# $Id$
|
# $Id$
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# coding: US-ASCII
|
||||||
require 'psych/helper'
|
require 'psych/helper'
|
||||||
|
|
||||||
module Psych
|
module Psych
|
||||||
|
|
|
@ -17,7 +17,7 @@ class TestRipper::Ripper < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_encoding
|
def test_encoding
|
||||||
assert_equal Encoding::US_ASCII, @ripper.encoding
|
assert_equal Encoding::UTF_8, @ripper.encoding
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_end_seen_eh
|
def test_end_seen_eh
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# coding: US-ASCII
|
||||||
require 'test/unit'
|
require 'test/unit'
|
||||||
require_relative 'envutil'
|
require_relative 'envutil'
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# coding: US-ASCII
|
||||||
require 'test/unit'
|
require 'test/unit'
|
||||||
require 'tmpdir'
|
require 'tmpdir'
|
||||||
require "fcntl"
|
require "fcntl"
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# coding: US-ASCII
|
||||||
require 'test/unit'
|
require 'test/unit'
|
||||||
require 'tmpdir'
|
require 'tmpdir'
|
||||||
require 'timeout'
|
require 'timeout'
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# coding: US-ASCII
|
||||||
require 'test/unit'
|
require 'test/unit'
|
||||||
require_relative 'envutil'
|
require_relative 'envutil'
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# coding: US-ASCII
|
||||||
require 'test/unit'
|
require 'test/unit'
|
||||||
|
|
||||||
class TestPack < Test::Unit::TestCase
|
class TestPack < Test::Unit::TestCase
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# coding: US-ASCII
|
||||||
require 'test/unit'
|
require 'test/unit'
|
||||||
require 'stringio'
|
require 'stringio'
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# coding: US-ASCII
|
||||||
require 'test/unit'
|
require 'test/unit'
|
||||||
require 'envutil'
|
require 'envutil'
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# coding: US-ASCII
|
||||||
require 'test/unit'
|
require 'test/unit'
|
||||||
require 'tempfile'
|
require 'tempfile'
|
||||||
begin
|
begin
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# coding: US-ASCII
|
||||||
require_relative "utils"
|
require_relative "utils"
|
||||||
require "webrick"
|
require "webrick"
|
||||||
require "test/unit"
|
require "test/unit"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue