[corlib] Ensure PCL compatibility with Mono.DataConverter
authorMatthew Leibowitz <mattleibow@live.com>
Thu, 11 Feb 2016 20:55:02 +0000 (22:55 +0200)
committerMatthew Leibowitz <mattleibow@live.com>
Thu, 11 Feb 2016 20:55:02 +0000 (22:55 +0200)
mcs/class/corlib/Mono/DataConverter.cs

index daf8eb72322c4afb80c2da740219ce0ba5f0d2db..b442da4d2fb51057e180cb1252e4409cc024306d 100644 (file)
@@ -683,7 +683,11 @@ namespace Mono {
                                                n = 2;
                                                break;
                                        case '7':
+#if PCL
+                                               e = Encoding.GetEncoding ("utf-7");
+#else
                                                e = Encoding.UTF7;
+#endif
                                                n = 1;
                                                break;
                                        case 'b':
@@ -691,11 +695,19 @@ namespace Mono {
                                                n = 2;
                                                break;
                                        case '3':
+#if PCL
+                                               e = Encoding.GetEncoding ("utf-32");
+#else
                                                e = Encoding.GetEncoding (12000);
+#endif
                                                n = 4;
                                                break;
                                        case '4':
+#if PCL
+                                               e = Encoding.GetEncoding ("utf-32BE");
+#else
                                                e = Encoding.GetEncoding (12001);
+#endif
                                                n = 4;
                                                break;