* [ruby-core:69841] [Ruby trunk - Bug #11324] [Open] Encoding to a String's own encoding with some options fails
[not found] <redmine.issue-11324.20150702082031@ruby-lang.org>
@ 2015-07-02 8:20 ` redmine.ruby-lang.org
2015-07-02 8:21 ` [ruby-core:69842] [Ruby trunk - Bug #11324] " redmine.ruby-lang.org
` (3 subsequent siblings)
4 siblings, 0 replies; 5+ messages in thread
From: redmine.ruby-lang.org @ 2015-07-02 8:20 UTC (permalink / raw)
To: ruby-core
Issue #11324 has been reported by Sakuro OZAWA.
----------------------------------------
Bug #11324: Encoding to a String's own encoding with some options fails
https://bugs.ruby-lang.org/issues/11324
* Author: Sakuro OZAWA
* Status: Open
* Priority: Normal
* Assignee:
* ruby -v: ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin14]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
To encode a `String` instance to its own encoding seems to be a bad idea, but following result looks strange:
```ruby
s = "A\nB\r\nC".force_encoding('US-ASCII')
#=> "A\nB\r\nC"
s.encode('US-ASCII')
#=> "A\nB\r\nC"
s.encode('US-ASCII', universal_newline: true)
#=> "A\nB\nC"
s.encode('US-ASCII', universal_newline: true, undef: :replace)
#=> "A\nB\nC"
s.encode('US-ASCII', universal_newline: true, undef: :replace, replace: '')
# Encoding::ConverterNotFoundError: code converter not found (universal_newline)
```
Only when all of these three options are fed, `String#encode` fails and provided message shows unclear encoding name.
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ruby-core:69842] [Ruby trunk - Bug #11324] Encoding to a String's own encoding with some options fails
[not found] <redmine.issue-11324.20150702082031@ruby-lang.org>
2015-07-02 8:20 ` [ruby-core:69841] [Ruby trunk - Bug #11324] [Open] Encoding to a String's own encoding with some options fails redmine.ruby-lang.org
@ 2015-07-02 8:21 ` redmine.ruby-lang.org
2015-07-03 6:48 ` [ruby-core:69847] " nobu
` (2 subsequent siblings)
4 siblings, 0 replies; 5+ messages in thread
From: redmine.ruby-lang.org @ 2015-07-02 8:21 UTC (permalink / raw)
To: ruby-core
Issue #11324 has been updated by Sakuro OZAWA.
See also #8123
----------------------------------------
Bug #11324: Encoding to a String's own encoding with some options fails
https://bugs.ruby-lang.org/issues/11324#change-53241
* Author: Sakuro OZAWA
* Status: Open
* Priority: Normal
* Assignee:
* ruby -v: ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin14]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
To encode a `String` instance to its own encoding seems to be a bad idea, but following result looks strange:
```ruby
s = "A\nB\r\nC".force_encoding('US-ASCII')
#=> "A\nB\r\nC"
s.encode('US-ASCII')
#=> "A\nB\r\nC"
s.encode('US-ASCII', universal_newline: true)
#=> "A\nB\nC"
s.encode('US-ASCII', universal_newline: true, undef: :replace)
#=> "A\nB\nC"
s.encode('US-ASCII', universal_newline: true, undef: :replace, replace: '')
# Encoding::ConverterNotFoundError: code converter not found (universal_newline)
```
Only when all of these three options are fed, `String#encode` fails and provided message shows unclear encoding name.
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ruby-core:69847] [Ruby trunk - Bug #11324] Encoding to a String's own encoding with some options fails
[not found] <redmine.issue-11324.20150702082031@ruby-lang.org>
2015-07-02 8:20 ` [ruby-core:69841] [Ruby trunk - Bug #11324] [Open] Encoding to a String's own encoding with some options fails redmine.ruby-lang.org
2015-07-02 8:21 ` [ruby-core:69842] [Ruby trunk - Bug #11324] " redmine.ruby-lang.org
@ 2015-07-03 6:48 ` nobu
2015-08-14 7:42 ` [ruby-core:70384] " nagachika00
2015-08-17 8:55 ` [ruby-core:70420] " usa
4 siblings, 0 replies; 5+ messages in thread
From: nobu @ 2015-07-03 6:48 UTC (permalink / raw)
To: ruby-core
Issue #11324 has been updated by Nobuyoshi Nakada.
Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN to 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: REQUIRED
----------------------------------------
Bug #11324: Encoding to a String's own encoding with some options fails
https://bugs.ruby-lang.org/issues/11324#change-53248
* Author: Sakuro OZAWA
* Status: Closed
* Priority: Normal
* Assignee:
* ruby -v: ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin14]
* Backport: 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: REQUIRED
----------------------------------------
To encode a `String` instance to its own encoding seems to be a bad idea, but following result looks strange:
```ruby
s = "A\nB\r\nC".force_encoding('US-ASCII')
#=> "A\nB\r\nC"
s.encode('US-ASCII')
#=> "A\nB\r\nC"
s.encode('US-ASCII', universal_newline: true)
#=> "A\nB\nC"
s.encode('US-ASCII', universal_newline: true, undef: :replace)
#=> "A\nB\nC"
s.encode('US-ASCII', universal_newline: true, undef: :replace, replace: '')
# Encoding::ConverterNotFoundError: code converter not found (universal_newline)
```
Only when all of these three options are fed, `String#encode` fails and provided message shows unclear encoding name.
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ruby-core:70384] [Ruby trunk - Bug #11324] Encoding to a String's own encoding with some options fails
[not found] <redmine.issue-11324.20150702082031@ruby-lang.org>
` (2 preceding siblings ...)
2015-07-03 6:48 ` [ruby-core:69847] " nobu
@ 2015-08-14 7:42 ` nagachika00
2015-08-17 8:55 ` [ruby-core:70420] " usa
4 siblings, 0 replies; 5+ messages in thread
From: nagachika00 @ 2015-08-14 7:42 UTC (permalink / raw)
To: ruby-core
Issue #11324 has been updated by Tomoyuki Chikanaga.
Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: REQUIRED to 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: DONE
Backported into `ruby_2_2` branch at r51573.
----------------------------------------
Bug #11324: Encoding to a String's own encoding with some options fails
https://bugs.ruby-lang.org/issues/11324#change-53787
* Author: Sakuro OZAWA
* Status: Closed
* Priority: Normal
* Assignee:
* ruby -v: ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin14]
* Backport: 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: DONE
----------------------------------------
To encode a `String` instance to its own encoding seems to be a bad idea, but following result looks strange:
```ruby
s = "A\nB\r\nC".force_encoding('US-ASCII')
#=> "A\nB\r\nC"
s.encode('US-ASCII')
#=> "A\nB\r\nC"
s.encode('US-ASCII', universal_newline: true)
#=> "A\nB\nC"
s.encode('US-ASCII', universal_newline: true, undef: :replace)
#=> "A\nB\nC"
s.encode('US-ASCII', universal_newline: true, undef: :replace, replace: '')
# Encoding::ConverterNotFoundError: code converter not found (universal_newline)
```
Only when all of these three options are fed, `String#encode` fails and provided message shows unclear encoding name.
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ruby-core:70420] [Ruby trunk - Bug #11324] Encoding to a String's own encoding with some options fails
[not found] <redmine.issue-11324.20150702082031@ruby-lang.org>
` (3 preceding siblings ...)
2015-08-14 7:42 ` [ruby-core:70384] " nagachika00
@ 2015-08-17 8:55 ` usa
4 siblings, 0 replies; 5+ messages in thread
From: usa @ 2015-08-17 8:55 UTC (permalink / raw)
To: ruby-core
Issue #11324 has been updated by Usaku NAKAMURA.
Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: DONE to 2.0.0: REQUIRED, 2.1: DONE, 2.2: DONE
ruby_2_1 r51614 merged revision(s) 51116.
----------------------------------------
Bug #11324: Encoding to a String's own encoding with some options fails
https://bugs.ruby-lang.org/issues/11324#change-53829
* Author: Sakuro OZAWA
* Status: Closed
* Priority: Normal
* Assignee:
* ruby -v: ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin14]
* Backport: 2.0.0: REQUIRED, 2.1: DONE, 2.2: DONE
----------------------------------------
To encode a `String` instance to its own encoding seems to be a bad idea, but following result looks strange:
```ruby
s = "A\nB\r\nC".force_encoding('US-ASCII')
#=> "A\nB\r\nC"
s.encode('US-ASCII')
#=> "A\nB\r\nC"
s.encode('US-ASCII', universal_newline: true)
#=> "A\nB\nC"
s.encode('US-ASCII', universal_newline: true, undef: :replace)
#=> "A\nB\nC"
s.encode('US-ASCII', universal_newline: true, undef: :replace, replace: '')
# Encoding::ConverterNotFoundError: code converter not found (universal_newline)
```
Only when all of these three options are fed, `String#encode` fails and provided message shows unclear encoding name.
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-08-17 8:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <redmine.issue-11324.20150702082031@ruby-lang.org>
2015-07-02 8:20 ` [ruby-core:69841] [Ruby trunk - Bug #11324] [Open] Encoding to a String's own encoding with some options fails redmine.ruby-lang.org
2015-07-02 8:21 ` [ruby-core:69842] [Ruby trunk - Bug #11324] " redmine.ruby-lang.org
2015-07-03 6:48 ` [ruby-core:69847] " nobu
2015-08-14 7:42 ` [ruby-core:70384] " nagachika00
2015-08-17 8:55 ` [ruby-core:70420] " usa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).