MantisBT - Open CASCADE | View Issue Details |
| ID | Project | Category | View Status | Date Submitted | Last Update | 0025308 | Open CASCADE | [OCCT] OCCT:Coding | public | 2014-10-01 13:12 | 2020-09-11 15:34 |
| Reporter | kgv | | Assigned To | pdn | | Priority | normal | Severity | integration request | | Status | new | Resolution | open | | Platform | | OS | | OS Version | | Product Version | | | Target Version | [OCCT] 7.6.0* | Fixed in Version | | | Test case number | |
| Summary | 0025308: TCollection_ExtendedString, NCollection_String - merge classes for string management | Description | There are several classes for string management with different capabilities but similar usage scenarios:
- TCollection_AsciiString. Main class for strings management in OCCT.
NULL-terminated.
Assumes fixed-length 1 byte long characters.
Provides formatting tools (LeftAdjust/RightAdjust/LowerCase/Capitalize/UpperCase).
Provides sub-string search tools.
Does not aware of UTF-8, but can transparently store such strings.
- TCollection_HAsciiString. Wrapper for TCollection_AsciiString for smart pointer creation.
- TCollection_ExtendedString. This class has been originally designed to store wide (UNICODE) strings in OCCT, mostly used in OCAF persistence, but rarely outside.
NULL-terminated.
Assumes fixed-length 2 bytes long characters.
Defines Standard_ExtCharacter as short, should be converted explicitly to wchar_t on Windows.
Provides formatting tools (LeftAdjust/RightAdjust/LowerCase/Capitalize/UpperCase).
Provides sub-string search tools.
Expect string in UTF-16 encoding, but unaware of surrogate pairs.
Has constructor from UTF-8 string (isMultiByte flag).
- TCollection_HExtendedString. Wrapper for TCollection_ExtendedString for smart pointer creation.
- NCollection_UtfString. Template class for UNICODE strings. Currently used in visualization for text rendering and interaction with FreeType.
NULL-terminated.
Assumes multibyte UNICODE characters (UTF8, UTF-16 or UTF32).
Stores length (in UNICODE characters) and buffer size.
Provides iterator NCollection_UtfIterator for efficient multibyte string processing (as alternative to accessing character by index).
Provides methods to convert UNICODE string from/to system locale and between UNICODE variants (UTF-8/UTF-16/UTF-32).
Does not provide string formatting capabilities.
It is considered to revise these classes to eliminate code duplication.
In addition, methods of class Resource_Unicode should be revised.
| Steps To Reproduce | | Additional information and documentation updates | | Tags | No tags attached. | Relationships | related to | 0022484 | closed | bugmaster | UNICODE characters support. | parent of | 0027676 | closed | bugmaster | Foundation Classes - define Standard_ExtCharacter, Standard_Utf16Char using C++11 types char16_t | related to | 0027838 | closed | kgv | Foundation Classes - support wchar_t* input within TCollection_AsciiString and TCollection_ExtendedString |
| Attached Files | |
| Issue History | Date Modified | Username | Field | Change | 2014-10-01 13:12 | kgv | New Issue | | 2014-10-01 13:12 | kgv | Assigned To | => kgv | 2014-10-01 13:12 | kgv | Assigned To | kgv => pdn | 2014-10-01 13:12 | kgv | Relationship added | related to 0022484 | 2014-12-03 11:48 | kgv | Description Updated | bug_revision_view_page.php?rev_id=8715#r8715 | 2016-07-14 10:44 | kgv | Relationship added | parent of 0027676 | 2016-09-04 14:35 | kgv | Relationship added | related to 0027838 | 2016-11-03 17:38 | abv | Target Version | 7.1.0 => 7.2.0 | 2017-07-20 12:29 | kgv | Target Version | 7.2.0 => 7.4.0 | 2019-07-10 19:27 | abv | Target Version | 7.4.0 => 7.5.0 | 2020-09-11 15:34 | utverdov | Target Version | 7.5.0 => 7.6.0* |
There are no notes attached to this issue. |
|