Permalink
Browse files

added all the ISO-8859 encodings left as some of them are used in rub…

…yspec

git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@5072 23306eb0-4c56-4727-a40e-e92c0eb68959
  • Loading branch information...
1 parent acfa610 commit 311371a2614d5703c22612d32ad275e5cf39d722 @vincentisambart vincentisambart committed Dec 22, 2010
Showing with 29 additions and 0 deletions.
  1. +14 −0 encoding.c
  2. +14 −0 encoding.h
  3. +1 −0 spec/frozen/tags/macruby/core/string/encoding_tags.txt
View
@@ -289,6 +289,20 @@ Init_PreEncoding(void)
add_encoding(ENCODING_UTF32BE, ENCODING_TYPE_UCNV, "UTF-32BE", 4, false, false, false, "UCS-4BE", NULL);
add_encoding(ENCODING_UTF32LE, ENCODING_TYPE_UCNV, "UTF-32LE", 4, false, false, true, "UCS-4LE", NULL);
add_encoding(ENCODING_ISO8859_1, ENCODING_TYPE_UCNV, "ISO-8859-1", 1, true, true, false, "ISO8859-1", NULL);
+ add_encoding(ENCODING_ISO8859_2, ENCODING_TYPE_UCNV, "ISO-8859-2", 1, true, true, false, "ISO8859-2", NULL);
+ add_encoding(ENCODING_ISO8859_3, ENCODING_TYPE_UCNV, "ISO-8859-3", 1, true, true, false, "ISO8859-3", NULL);
+ add_encoding(ENCODING_ISO8859_4, ENCODING_TYPE_UCNV, "ISO-8859-4", 1, true, true, false, "ISO8859-4", NULL);
+ add_encoding(ENCODING_ISO8859_5, ENCODING_TYPE_UCNV, "ISO-8859-5", 1, true, true, false, "ISO8859-5", NULL);
+ add_encoding(ENCODING_ISO8859_6, ENCODING_TYPE_UCNV, "ISO-8859-6", 1, true, true, false, "ISO8859-6", NULL);
+ add_encoding(ENCODING_ISO8859_7, ENCODING_TYPE_UCNV, "ISO-8859-7", 1, true, true, false, "ISO8859-7", NULL);
+ add_encoding(ENCODING_ISO8859_8, ENCODING_TYPE_UCNV, "ISO-8859-8", 1, true, true, false, "ISO8859-8", NULL);
+ add_encoding(ENCODING_ISO8859_9, ENCODING_TYPE_UCNV, "ISO-8859-9", 1, true, true, false, "ISO8859-9", NULL);
+ add_encoding(ENCODING_ISO8859_10, ENCODING_TYPE_UCNV, "ISO-8859-10", 1, true, true, false, "ISO8859-10", NULL);
+ add_encoding(ENCODING_ISO8859_11, ENCODING_TYPE_UCNV, "ISO-8859-11", 1, true, true, false, "ISO8859-11", NULL);
+ add_encoding(ENCODING_ISO8859_13, ENCODING_TYPE_UCNV, "ISO-8859-13", 1, true, true, false, "ISO8859-13", NULL);
+ add_encoding(ENCODING_ISO8859_14, ENCODING_TYPE_UCNV, "ISO-8859-14", 1, true, true, false, "ISO8859-14", NULL);
+ add_encoding(ENCODING_ISO8859_15, ENCODING_TYPE_UCNV, "ISO-8859-15", 1, true, true, false, "ISO8859-15", NULL);
+ add_encoding(ENCODING_ISO8859_16, ENCODING_TYPE_UCNV, "ISO-8859-16", 1, true, true, false, "ISO8859-16", NULL);
add_encoding(ENCODING_MACROMAN, ENCODING_TYPE_UCNV, "macRoman", 1, true, true, false, NULL);
add_encoding(ENCODING_MACCYRILLIC, ENCODING_TYPE_UCNV, "macCyrillic", 1, true, true, false, NULL);
add_encoding(ENCODING_BIG5, ENCODING_TYPE_UCNV, "Big5", 1, false, true, false, "CP950", NULL);
View
@@ -133,6 +133,20 @@ enum {
ENCODING_UTF32BE,
ENCODING_UTF32LE,
ENCODING_ISO8859_1,
+ ENCODING_ISO8859_2,
+ ENCODING_ISO8859_3,
+ ENCODING_ISO8859_4,
+ ENCODING_ISO8859_5,
+ ENCODING_ISO8859_6,
+ ENCODING_ISO8859_7,
+ ENCODING_ISO8859_8,
+ ENCODING_ISO8859_9,
+ ENCODING_ISO8859_10,
+ ENCODING_ISO8859_11,
+ ENCODING_ISO8859_13,
+ ENCODING_ISO8859_14,
+ ENCODING_ISO8859_15,
+ ENCODING_ISO8859_16,
ENCODING_MACROMAN,
ENCODING_MACCYRILLIC,
ENCODING_BIG5,
@@ -1,3 +1,4 @@
+fails:String#encoding is equal to the source encoding by default
fails:String#encoding for US-ASCII Strings returns US-ASCII if self is US-ASCII
fails:String#encoding for US-ASCII Strings returns US-ASCII if self is US-ASCII only, despite the default internal encoding being different
fails:String#encoding for US-ASCII Strings returns US-ASCII if self is US-ASCII only, despite the default external encoding being different

0 comments on commit 311371a

Please sign in to comment.