From: matz@... (Yukihiro Matsumoto) Date: 2002-08-02T01:19:53+09:00 Subject: Re: Unicode in Ruby now? Hi, In message "Re: Unicode in Ruby now?" on 02/08/01, Curt Sampson writes: |Well, what Java does works fine for me. Basically, java has "streams" |which do binary I/O, and "readers/writers" which do character I/O. So to |do character I/O, you hand your InputStream or OutputStream to a class |that implements the InputReader or OutputWriter interface, and does the |charecter encoding conversion. Typically methods that open files or |whatever and return a reader or writer will have two signatures: one |which uses the "system default" character encoding (set by the locale |when you start the JVM), and the other where you can explicitly specify |the character encoding as a parameter. | |This makes it easy to write "auto-sensing" InputReaders, too; so |long as they can read enough in advance of the first read from the |consumer, they can buffer it and look to see if it's, for example, |Shift_JIS versus EUC-JP. Thank you for information. |BTW, I'd prefer to use the term "character encoding" rather than |"character set," as technically, the character set is just the |characters themselves, and not their assigment to binary numbers |or number sequences. Also, it would probably be best to use the |IANA standards for character encoding (though they call them |"character sets") names, available at | | http://www.iana.org/assignments/character-sets I use the following definitions: character set: the set of characters with number assigned to each character. code point: the assigned number for each character in particular character set character encoding scheme: the way to represent sequence of code points. Mojikyo is a character set. Unicode is a character set. UTF-8 is a character encoding scheme for Unicode. Shift_JIS is a character encoding scheme. ISO 10646 defines both character set and encoding scheme. matz.