[macruby-changes] [4054] MacRuby/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Sat May 8 23:59:16 PDT 2010
Revision: 4054
http://trac.macosforge.org/projects/ruby/changeset/4054
Author: vincent.isambart at gmail.com
Date: 2010-05-08 23:59:13 -0700 (Sat, 08 May 2010)
Log Message:
-----------
added the encodings used in the specs to be able to remove tags
Modified Paths:
--------------
MacRuby/trunk/encoding.c
MacRuby/trunk/encoding.h
MacRuby/trunk/spec/frozen/tags/macruby/core/string/encode_tags.txt
Removed Paths:
-------------
MacRuby/trunk/spec/frozen/tags/macruby/core/string/encode_bang_tags.txt
Modified: MacRuby/trunk/encoding.c
===================================================================
--- MacRuby/trunk/encoding.c 2010-05-09 06:45:47 UTC (rev 4053)
+++ MacRuby/trunk/encoding.c 2010-05-09 06:59:13 UTC (rev 4054)
@@ -258,17 +258,19 @@
void
Init_PreEncoding(void)
{
- add_encoding(ENCODING_BINARY, ENCODING_TYPE_SPECIAL, "ASCII-8BIT", 1, true, true, "BINARY", NULL);
- add_encoding(ENCODING_ASCII, ENCODING_TYPE_UCNV, "US-ASCII", 1, true, true, "ASCII", "ANSI_X3.4-1968", "646", NULL);
- add_encoding(ENCODING_UTF8, ENCODING_TYPE_UCNV, "UTF-8", 1, false, true, "CP65001", NULL);
- add_encoding(ENCODING_UTF16BE, ENCODING_TYPE_UCNV, "UTF-16BE", 2, false, false, NULL);
- add_encoding(ENCODING_UTF16LE, ENCODING_TYPE_UCNV, "UTF-16LE", 2, false, false, NULL);
- add_encoding(ENCODING_UTF32BE, ENCODING_TYPE_UCNV, "UTF-32BE", 4, false, false, "UCS-4BE", NULL);
- add_encoding(ENCODING_UTF32LE, ENCODING_TYPE_UCNV, "UTF-32LE", 4, false, false, "UCS-4LE", NULL);
- add_encoding(ENCODING_ISO8859_1, ENCODING_TYPE_UCNV, "ISO-8859-1", 1, true, true, "ISO8859-1", NULL);
- add_encoding(ENCODING_MACROMAN, ENCODING_TYPE_UCNV, "macRoman", 1, true, true, NULL);
+ add_encoding(ENCODING_BINARY, ENCODING_TYPE_SPECIAL, "ASCII-8BIT", 1, true, true, "BINARY", NULL);
+ add_encoding(ENCODING_ASCII, ENCODING_TYPE_UCNV, "US-ASCII", 1, true, true, "ASCII", "ANSI_X3.4-1968", "646", NULL);
+ add_encoding(ENCODING_UTF8, ENCODING_TYPE_UCNV, "UTF-8", 1, false, true, "CP65001", NULL);
+ add_encoding(ENCODING_UTF16BE, ENCODING_TYPE_UCNV, "UTF-16BE", 2, false, false, NULL);
+ add_encoding(ENCODING_UTF16LE, ENCODING_TYPE_UCNV, "UTF-16LE", 2, false, false, NULL);
+ add_encoding(ENCODING_UTF32BE, ENCODING_TYPE_UCNV, "UTF-32BE", 4, false, false, "UCS-4BE", NULL);
+ add_encoding(ENCODING_UTF32LE, ENCODING_TYPE_UCNV, "UTF-32LE", 4, false, false, "UCS-4LE", NULL);
+ add_encoding(ENCODING_ISO8859_1, ENCODING_TYPE_UCNV, "ISO-8859-1", 1, true, true, "ISO8859-1", NULL);
+ add_encoding(ENCODING_MACROMAN, ENCODING_TYPE_UCNV, "macRoman", 1, true, true, NULL);
+ add_encoding(ENCODING_MACCYRILLIC, ENCODING_TYPE_UCNV, "macCyrillic", 1, true, true, NULL);
+ add_encoding(ENCODING_BIG5, ENCODING_TYPE_UCNV, "Big5", 1, false, true, "CP950", NULL);
// FIXME: the ICU conversion tables do not seem to match Ruby's Japanese conversion tables
- add_encoding(ENCODING_EUCJP, ENCODING_TYPE_UCNV, "EUC-JP", 1, false, true, "eucJP", NULL);
+ add_encoding(ENCODING_EUCJP, ENCODING_TYPE_UCNV, "EUC-JP", 1, false, true, "eucJP", NULL);
//add_encoding(ENCODING_EUCJP, ENCODING_TYPE_RUBY, "EUC-JP", 1, false, true, "eucJP", NULL);
//add_encoding(ENCODING_SJIS, ENCODING_TYPE_RUBY, "Shift_JIS", 1, false, true, "SJIS", NULL);
//add_encoding(ENCODING_CP932, ENCODING_TYPE_RUBY, "Windows-31J", 1, false, true, "CP932", "csWindows31J", NULL);
Modified: MacRuby/trunk/encoding.h
===================================================================
--- MacRuby/trunk/encoding.h 2010-05-09 06:45:47 UTC (rev 4053)
+++ MacRuby/trunk/encoding.h 2010-05-09 06:59:13 UTC (rev 4054)
@@ -145,6 +145,8 @@
ENCODING_UTF32LE,
ENCODING_ISO8859_1,
ENCODING_MACROMAN,
+ ENCODING_MACCYRILLIC,
+ ENCODING_BIG5,
ENCODING_EUCJP,
//ENCODING_SJIS,
//ENCODING_CP932,
Deleted: MacRuby/trunk/spec/frozen/tags/macruby/core/string/encode_bang_tags.txt
===================================================================
--- MacRuby/trunk/spec/frozen/tags/macruby/core/string/encode_bang_tags.txt 2010-05-09 06:45:47 UTC (rev 4053)
+++ MacRuby/trunk/spec/frozen/tags/macruby/core/string/encode_bang_tags.txt 2010-05-09 06:59:13 UTC (rev 4054)
@@ -1,14 +0,0 @@
-fails:String#encode! transcodes to the default internal encoding with no argument
-fails:String#encode! transcodes self to the given encoding
-fails:String#encode! can convert between encodings where a multi-stage conversion path is needed
-fails:String#encode! raises an Encoding::InvalidByteSequenceError for invalid byte sequences
-fails:String#encode! raises UndefinedConversionError if the String contains characters invalid for the target encoding
-fails:String#encode! raises Encoding::ConverterNotFoundError for invalid target encodings
-fails:String#encode! replaces invalid characters
-fails:String#encode! replaces undefined characters
-fails:String#encode! replaces xml characters
-fails:String#encode! replaces xml characters and quotes the result
-fails:String#encode! raises a RuntimeError when called on a frozen String
-fails:String#encode! raises a RuntimeError when called on a frozen String when it's a no-op
-fails:String#encode! returns self when called with only a target encoding
-fails:String#encode! tags the String with the given encoding
Modified: MacRuby/trunk/spec/frozen/tags/macruby/core/string/encode_tags.txt
===================================================================
--- MacRuby/trunk/spec/frozen/tags/macruby/core/string/encode_tags.txt 2010-05-09 06:45:47 UTC (rev 4053)
+++ MacRuby/trunk/spec/frozen/tags/macruby/core/string/encode_tags.txt 2010-05-09 06:59:13 UTC (rev 4054)
@@ -1,9 +1,4 @@
-fails:String#encode! can convert between encodings where a multi-stage conversion path is needed
-fails:String#encode! raises UndefinedConversionError if the String contains characters invalid for the target encoding
fails:String#encode! raises Encoding::ConverterNotFoundError for invalid target encodings
-fails:String#encode returns self when called with only a target encoding
-fails:String#encode can convert between encodings where a multi-stage conversion path is needed
-fails:String#encode raises UndefinedConversionError if the String contains characters invalid for the target encoding
fails:String#encode raises Encoding::ConverterNotFoundError for invalid target encodings
fails:String#encode! replaces xml characters
fails:String#encode! replaces xml characters and quotes the result
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100508/5b96126d/attachment.html>
More information about the macruby-changes
mailing list