mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0028454: Data Exchange, STEP reader - names with special characters cannot be read
- Add support of the control directives ( "\X2\" "\X4" "\X\" "\P*\" "\S\"); - Make param "read.stepcaf.codepage" base for conversion inside StepData instead of CAF; - Rename "read.stepcaf.codepage" to "read.step.codepage". - Add ISO 8859-1 - 9 code pages for conversion - Add Resource_FormatType_NoConversion format type, that indicates non-conversion behavior - Update old test cases that contain control directives
This commit is contained in:
@@ -217,6 +217,38 @@ STEPControl_Controller::STEPControl_Controller ()
|
||||
Interface_Static::Init("step", "read.step.root.transformation", '&', "eval OFF");
|
||||
Interface_Static::SetCVal("read.step.root.transformation", "ON");
|
||||
|
||||
// STEP file encoding for names translation
|
||||
// Note: the numbers should be consistent with Resource_FormatType enumeration
|
||||
Interface_Static::Init("step", "read.step.codepage", 'e', "");
|
||||
Interface_Static::Init("step", "read.step.codepage", '&', "enum 0");
|
||||
Interface_Static::Init("step", "read.step.codepage", '&', "eval SJIS"); // Resource_FormatType_SJIS
|
||||
Interface_Static::Init("step", "read.step.codepage", '&', "eval EUC"); // Resource_FormatType_EUC
|
||||
Interface_Static::Init("step", "read.step.codepage", '&', "eval NoConversion"); // Resource_FormatType_NoConversion
|
||||
Interface_Static::Init("step", "read.step.codepage", '&', "eval GB"); // Resource_FormatType_GB
|
||||
Interface_Static::Init("step", "read.step.codepage", '&', "eval UTF8"); // Resource_FormatType_UTF8
|
||||
Interface_Static::Init("step", "read.step.codepage", '&', "eval SystemLocale"); // Resource_FormatType_SystemLocale
|
||||
Interface_Static::Init("step", "read.step.codepage", '&', "eval CP1250"); // Resource_FormatType_CP1250
|
||||
Interface_Static::Init("step", "read.step.codepage", '&', "eval CP1251"); // Resource_FormatType_CP1251
|
||||
Interface_Static::Init("step", "read.step.codepage", '&', "eval CP1252"); // Resource_FormatType_CP1252
|
||||
Interface_Static::Init("step", "read.step.codepage", '&', "eval CP1253"); // Resource_FormatType_CP1253
|
||||
Interface_Static::Init("step", "read.step.codepage", '&', "eval CP1254"); // Resource_FormatType_CP1254
|
||||
Interface_Static::Init("step", "read.step.codepage", '&', "eval CP1255"); // Resource_FormatType_CP1255
|
||||
Interface_Static::Init("step", "read.step.codepage", '&', "eval CP1256"); // Resource_FormatType_CP1256
|
||||
Interface_Static::Init("step", "read.step.codepage", '&', "eval CP1257"); // Resource_FormatType_CP1257
|
||||
Interface_Static::Init("step", "read.step.codepage", '&', "eval CP1258"); // Resource_FormatType_CP1258
|
||||
Interface_Static::Init("step", "read.step.codepage", '&', "eval iso8859-1"); // Resource_FormatType_iso8859_1
|
||||
Interface_Static::Init("step", "read.step.codepage", '&', "eval iso8859-2"); // Resource_FormatType_iso8859_2
|
||||
Interface_Static::Init("step", "read.step.codepage", '&', "eval iso8859-3"); // Resource_FormatType_iso8859_3
|
||||
Interface_Static::Init("step", "read.step.codepage", '&', "eval iso8859-4"); // Resource_FormatType_iso8859_4
|
||||
Interface_Static::Init("step", "read.step.codepage", '&', "eval iso8859-5"); // Resource_FormatType_iso8859_5
|
||||
Interface_Static::Init("step", "read.step.codepage", '&', "eval iso8859-6"); // Resource_FormatType_iso8859_6
|
||||
Interface_Static::Init("step", "read.step.codepage", '&', "eval iso8859-7"); // Resource_FormatType_iso8859_7
|
||||
Interface_Static::Init("step", "read.step.codepage", '&', "eval iso8859-8"); // Resource_FormatType_iso8859_8
|
||||
Interface_Static::Init("step", "read.step.codepage", '&', "eval iso8859-9"); // Resource_FormatType_iso8859_9
|
||||
Interface_Static::SetCVal("read.step.codepage", "UTF8");
|
||||
|
||||
Standard_STATIC_ASSERT((int)Resource_FormatType_iso8859_9 - (int)Resource_FormatType_CP1250 == 17); // "Error: Invalid Codepage Enumeration"
|
||||
|
||||
init = Standard_True;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user