0030694: Data Exchange - support non-standard GB2312-encoded STEP files
[occt.git] / src / STEPCAFControl / STEPCAFControl_Controller.cxx
index 1b5d414..5e43b80 100644 (file)
@@ -69,5 +69,17 @@ Standard_Boolean STEPCAFControl_Controller::Init ()
   Interface_Static::Init   ("stepcaf", "read.stepcaf.subshapes.name", '&', "eval On");  // 1
   Interface_Static::SetIVal("read.stepcaf.subshapes.name", 0); // Disabled by default
 
+  // STEP file encoding for names translation
+  // Note: the numbers should be consistent with Resource_FormatType enumeration
+  Interface_Static::Init ("step", "read.stepcaf.codepage", 'e', "");
+  Interface_Static::Init ("step", "read.stepcaf.codepage", '&', "enum 0");
+  Interface_Static::Init ("step", "read.stepcaf.codepage", '&', "eval SJIS");         // Resource_FormatType_SJIS
+  Interface_Static::Init ("step", "read.stepcaf.codepage", '&', "eval EUC");          // Resource_FormatType_EUC
+  Interface_Static::Init ("step", "read.stepcaf.codepage", '&', "eval ANSI");         // Resource_FormatType_ANSI
+  Interface_Static::Init ("step", "read.stepcaf.codepage", '&', "eval GB");           // Resource_FormatType_GB
+  Interface_Static::Init ("step", "read.stepcaf.codepage", '&', "eval UTF8");         // Resource_FormatType_UTF8
+  Interface_Static::Init ("step", "read.stepcaf.codepage", '&', "eval SystemLocale"); // Resource_FormatType_SystemLocale
+  Interface_Static::SetCVal ("read.stepcaf.codepage", "UTF8");
+
   return Standard_True;
 }