Project

General

Profile

Bug #5949

Add documentation introduction for the Encoding class

Added by Florent2 (Florent Guilleux) over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
ruby -v:
1.9.3
Backport:
[ruby-core:42267]

Description

Add documentation introduction for the Encoding class


Files

Associated revisions

Revision 6d76f39f
Added by drbrain (Eric Hodel) over 7 years ago

  • encoding.c (Init_Encoding): Add Encoding documentation. [ruby-trunk - Bug #5949]
  • encoding.c (rb_set_default_external): Fix typo in documentation.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 34608
Added by drbrain (Eric Hodel) over 7 years ago

  • encoding.c (Init_Encoding): Add Encoding documentation. [ruby-trunk - Bug #5949]
  • encoding.c (rb_set_default_external): Fix typo in documentation.

Revision 34608
Added by drbrain (Eric Hodel) over 7 years ago

  • encoding.c (Init_Encoding): Add Encoding documentation. [ruby-trunk - Bug #5949]
  • encoding.c (rb_set_default_external): Fix typo in documentation.

Revision 34608
Added by drbrain (Eric Hodel) over 7 years ago

  • encoding.c (Init_Encoding): Add Encoding documentation. [ruby-trunk - Bug #5949]
  • encoding.c (rb_set_default_external): Fix typo in documentation.

Revision 34608
Added by drbrain (Eric Hodel) over 7 years ago

  • encoding.c (Init_Encoding): Add Encoding documentation. [ruby-trunk - Bug #5949]
  • encoding.c (rb_set_default_external): Fix typo in documentation.

Revision 34608
Added by drbrain (Eric Hodel) over 7 years ago

  • encoding.c (Init_Encoding): Add Encoding documentation. [ruby-trunk - Bug #5949]
  • encoding.c (rb_set_default_external): Fix typo in documentation.

Revision 34608
Added by drbrain (Eric Hodel) over 7 years ago

  • encoding.c (Init_Encoding): Add Encoding documentation. [ruby-trunk - Bug #5949]
  • encoding.c (rb_set_default_external): Fix typo in documentation.

Revision b14b83ae
Added by drbrain (Eric Hodel) over 7 years ago

  • encoding.c (Init_Encoding): Add IO example of internal and external encoding. Fixed a typo in the force_encoding example. [#5949]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 34609
Added by drbrain (Eric Hodel) over 7 years ago

  • encoding.c (Init_Encoding): Add IO example of internal and external encoding. Fixed a typo in the force_encoding example. [#5949]

Revision 34609
Added by drbrain (Eric Hodel) over 7 years ago

  • encoding.c (Init_Encoding): Add IO example of internal and external encoding. Fixed a typo in the force_encoding example. [#5949]

Revision 34609
Added by drbrain (Eric Hodel) over 7 years ago

  • encoding.c (Init_Encoding): Add IO example of internal and external encoding. Fixed a typo in the force_encoding example. [#5949]

Revision 34609
Added by drbrain (Eric Hodel) over 7 years ago

  • encoding.c (Init_Encoding): Add IO example of internal and external encoding. Fixed a typo in the force_encoding example. [#5949]

Revision 34609
Added by drbrain (Eric Hodel) over 7 years ago

  • encoding.c (Init_Encoding): Add IO example of internal and external encoding. Fixed a typo in the force_encoding example. [#5949]

Revision 34609
Added by drbrain (Eric Hodel) over 7 years ago

  • encoding.c (Init_Encoding): Add IO example of internal and external encoding. Fixed a typo in the force_encoding example. [#5949]

History

Updated by Eregon (Benoit Daloze) over 7 years ago

Really nice documentation, thank you for writing this!

Updated by mfn (Markus Fischer) over 7 years ago

Impressive, thanks!

I think you have a typo on line 1698 ; if it's supposed to be a ruby code example, the Encoding:ISO-8859-1 needs two double colons "::".

I was reading a few times through the external/internal encoding chapters, but I wish I'd really see an example making actual usage of an IO object; I think it would help tremendously to grasp the concept and apply it to real code.

Thank you

#3

Updated by drbrain (Eric Hodel) over 7 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r34608.
Florent, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • encoding.c (Init_Encoding): Add Encoding documentation. [ruby-trunk - Bug #5949]
  • encoding.c (rb_set_default_external): Fix typo in documentation.

Updated by drbrain (Eric Hodel) over 7 years ago

Florent, I altered your original submission to recommend against Encoding.default_external= and Encoding.default_internal= as they cause issues with inconsistent encodings (see the individual method documentation). Also, please trim trailing whitespace.

I also fixed the typo and added the IO example requested by Markus

Updated by Florent2 (Florent Guilleux) over 7 years ago

Thanks for your feedback and Eric for improving my submission! I've just seen your tweet Eric, sorry I had missed all the ticket updates, when I created the ticket I had not noticed that I was not watching it by default.

Also available in: Atom PDF