ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:41160] [ruby-trunk - Bug #5650][Open] Add rb_enc_raise() to allow C extensions to raise errors with messages with correct encoding
@ 2011-11-19 18:33 Nikolai Weibull
  2011-11-21  9:14 ` [ruby-core:41172] [ruby-trunk - Feature #5650][Feedback] " Nobuyoshi Nakada
  0 siblings, 1 reply; 3+ messages in thread
From: Nikolai Weibull @ 2011-11-19 18:33 UTC (permalink / raw
  To: ruby-core


Issue #5650 has been reported by Nikolai Weibull.

----------------------------------------
Bug #5650: Add rb_enc_raise() to allow C extensions to raise errors with messages with correct encoding
http://redmine.ruby-lang.org/issues/5650

Author: Nikolai Weibull
Status: Open
Priority: Normal
Assignee: 
Category: core
Target version: 
ruby -v: uby 2.0.0dev


Currently, rb_raise raises exceptions with a message with an encoding set to ASCII-8BIT.  Adding rb_enc_raise() will allow the caller to raise an exception with a message with a given encoding.


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ruby-core:41172] [ruby-trunk - Feature #5650][Feedback] Add rb_enc_raise() to allow C extensions to raise errors with messages with correct encoding
  2011-11-19 18:33 [ruby-core:41160] [ruby-trunk - Bug #5650][Open] Add rb_enc_raise() to allow C extensions to raise errors with messages with correct encoding Nikolai Weibull
@ 2011-11-21  9:14 ` Nobuyoshi Nakada
  2011-11-23 19:55   ` [ruby-core:41259] " Nikolai Weibull
  0 siblings, 1 reply; 3+ messages in thread
From: Nobuyoshi Nakada @ 2011-11-21  9:14 UTC (permalink / raw
  To: ruby-core


Issue #5650 has been updated by Nobuyoshi Nakada.

Status changed from Open to Feedback
Target version set to 2.0.0

I agree that exceptions need to consider encodings.
But I'm curious about your usage.  Which needs the encoding, the format string or arguments to be converted?

----------------------------------------
Feature #5650: Add rb_enc_raise() to allow C extensions to raise errors with messages with correct encoding
http://redmine.ruby-lang.org/issues/5650

Author: Nikolai Weibull
Status: Feedback
Priority: Normal
Assignee: 
Category: core
Target version: 2.0.0


Currently, rb_raise raises exceptions with a message with an encoding set to ASCII-8BIT.  Adding rb_enc_raise() will allow the caller to raise an exception with a message with a given encoding.


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ruby-core:41259] Re: [ruby-trunk - Feature #5650][Feedback] Add rb_enc_raise() to allow C extensions to raise errors with messages with correct encoding
  2011-11-21  9:14 ` [ruby-core:41172] [ruby-trunk - Feature #5650][Feedback] " Nobuyoshi Nakada
@ 2011-11-23 19:55   ` Nikolai Weibull
  0 siblings, 0 replies; 3+ messages in thread
From: Nikolai Weibull @ 2011-11-23 19:55 UTC (permalink / raw
  To: ruby-core

On Mon, Nov 21, 2011 at 10:14, Nobuyoshi Nakada <nobu@ruby-lang.org> wrote:

> I agree that exceptions need to consider encodings.
> But I'm curious about your usage.  Which needs the encoding, the format string or arguments to be converted?

Well, I simply think that passing the encoding to rb_enc_vsprintf as
in the patch should be fine.  That, as I understand it, sets the
encoding of the format string and then any arguments will be converted
to the format strings encoding.  Is that correct?

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-11-23 20:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-19 18:33 [ruby-core:41160] [ruby-trunk - Bug #5650][Open] Add rb_enc_raise() to allow C extensions to raise errors with messages with correct encoding Nikolai Weibull
2011-11-21  9:14 ` [ruby-core:41172] [ruby-trunk - Feature #5650][Feedback] " Nobuyoshi Nakada
2011-11-23 19:55   ` [ruby-core:41259] " Nikolai Weibull

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).