Permalink
Browse files

added the encodings used in the specs to be able to remove tags

git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4054 23306eb0-4c56-4727-a40e-e92c0eb68959
  • Loading branch information...
vincentisambart committed May 9, 2010
1 parent e23dfce commit 0f755839996dec248ea24f476c75bc21122aab46
View
@@ -258,17 +258,19 @@ add_encoding(
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);
View
@@ -145,6 +145,8 @@ enum {
ENCODING_UTF32LE,
ENCODING_ISO8859_1,
ENCODING_MACROMAN,
+ ENCODING_MACCYRILLIC,
+ ENCODING_BIG5,
ENCODING_EUCJP,
//ENCODING_SJIS,
//ENCODING_CP932,
@@ -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
@@ -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

0 comments on commit 0f75583

Please sign in to comment.