View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0026514 | Open CASCADE | OCCT:Foundation Classes | public | 2015-08-03 18:50 | 2020-10-28 06:37 |
| Reporter | Assigned To | bugmaster | |||
| Priority | normal | Severity | minor | ||
| Status | closed | Resolution | fixed | ||
| Platform | Linux | OS | RHEL | ||
| Product Version | 6.3.1 | ||||
| Target Version | 7.0.0 | Fixed in Version | 7.0.0 | ||
| Summary | 0026514: OSD_Path can not work with French symbols in file name. | ||||
| Description | If we have file like découverte.xml then OSD_Path raise an exception in OSD_Path::SetValues function. The Nam.IsAscii() returns Standard_False. In other hand if we have TCollection_ExtendedString (aNameExt) with "découverte.xml" then the following command do nothing: TCollection_AsciiString aName( aNameExt, '_' ) because IsAnAscii(c) function returns Standard_True in TCollection_AsciiString constructor. | ||||
| Steps To Reproduce | http://diagrams.mantis.opencascade.com/view.php?id=534 | ||||
| Tags | No tags attached. | ||||
| Test case number | Not needed | ||||
| related to | 0024716 | closed | bugmaster | Open CASCADE | OSD_Path - remove excessive validity checks and allow non-ascii strings |
| related to | 0022484 | closed | bugmaster | Open CASCADE | UNICODE characters support. |
| parent of | 0027100 | closed | Open CASCADE | OSD_Path missing constructor accepting path parameter as TCollection_ExtendedString | |
| related to | 0027585 | closed | apn | Community | It is not possible to store OCAF documents to paths with special characters in their names |
|
|
Branch CR26514 has been created by mnt. SHA-1: f2237719783619358958440b9477fe4787a9d029 Detailed log of new commits: Author: User for GUITHARE project Date: Mon Aug 3 20:02:20 2015 +0300 0026514: OSD_Path can not work with French symbols in file name. |
|
|
Patch author name is wrong, please fix it. |
|
|
Branch CR26514 has been updated forcibly by inv. SHA-1: b0676397e86784190a179b36f4cc6887dc710d87 |
|
|
The patch is incorrect. Function IsAnAscii() accepts ExtCharacter (two-byte word) and returns True if it fits into one byte. It will always return True for char argument, thus method TCollection_AsciiString::IsAscii() will always return true. By original intent, method IsAscii() indicates whether string contains only basic ASCII symbols (0-127), except control symbols (0-31). This perhaps needs revision. Non-Ascii symbols, such as French letters, can be put to TCollection_AsciiString in two variants: - as extended Ascii symbols, in current locale - in UTF-8 encoding Current convention is to use UTF-8 encoding. This allows storing any Unicode symbols in TCollection_AsciiString, and use it e.g. for work with file names. Most of OCCT functionality working with files (STEP, IGES, BREP reader/writers, etc.) already support this. I propose the following approach: - in OCCT: remove checks for IsAscii() from OSD_Path. Though some checks might be useful, they rather should be system-specific (e.g. check that file name does not contains punctuation symbols), it is unlikely worth doing that now. - in your application: convert localized strings to UTF-8 before putting it to TCollection_AsciiString. When it is converted to ExtendedString, use MultiByte argument of constructor. If you are operate with files directly, consider using utility functions defined in OSD_File.hxx. |
|
|
The problem is fixed inside DIAGRAM sources. |
|
|
Branch CR26514_1 has been created by abv. SHA-1: 5c3166471a0af24ed850bec35c613abba0542877 Detailed log of new commits: Author: abv Date: Thu Jan 7 21:15:29 2016 +0300 0026514: OSD_Path can not work with French symbols in file name. Restriction on path to contain only basic ASCII symbols is removed in OSD_Path, to allow paths to contain any symbols (defined in UTF-8 encoding). |
|
|
Fix pushed to CR26514, please review |
|
|
Please test the patch. Test case is not needed. |
|
|
Dear BugMaster, Branch CR26514_1 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested. SHA-1: 5c3166471a0af24ed850bec35c613abba0542877 Number of compiler warnings: occt component: Linux: 0 (0 on master) Windows: 0 (0 on master) MasOS: 134 (134 on master) products component: Linux: 37 (37 on master) Windows: 0 (0 on master) Regressions/Differences: Not detected Testing cases: Not needed Testing on Linux: Total MEMORY difference: 90013297 / 89882677 [+0.15%] Total CPU difference: 19205.690000000155 / 19263.900000000092 [-0.30%] Testing on Windows: Total MEMORY difference: 57211616 / 57466619 [-0.44%] Total CPU difference: 17798.48169209903 / 18535.477216399115 [-3.98%] |
|
|
Branch CR26514 has been deleted by kgv. SHA-1: b0676397e86784190a179b36f4cc6887dc710d87 |
|
|
Branch CR26514_1 has been deleted by kgv. SHA-1: 5c3166471a0af24ed850bec35c613abba0542877 |
|
occt: master d868695f 2016-01-07 18:15:29
Committer: bugmaster Details Diff |
0026514: OSD_Path can not work with French symbols in file name. Restriction on path to contain only basic ASCII symbols is removed in OSD_Path, to allow paths to contain any symbols (defined in UTF-8 encoding). |
Affected Issues 0026514 |
|
| mod - src/OSD/OSD_Path.cxx | Diff File | ||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2015-08-03 18:50 |
|
New Issue | |
| 2015-08-03 18:50 |
|
Assigned To | => vtn |
| 2015-08-03 20:03 | git | Note Added: 0043799 | |
| 2015-08-03 20:05 |
|
Assigned To | vtn => abv |
| 2015-08-03 20:05 |
|
Status | new => resolved |
| 2015-08-03 20:05 |
|
Steps to Reproduce Updated | |
| 2015-08-03 20:55 | kgv | Relationship added | related to 0024716 |
| 2015-08-03 20:55 | kgv | Relationship added | related to 0022484 |
| 2015-08-03 21:03 | kgv | Note Added: 0043800 | |
| 2015-08-04 11:21 | git | Note Added: 0043801 | |
| 2015-08-12 10:41 |
|
Note Added: 0044018 | |
| 2015-08-12 11:02 |
|
Assigned To | abv => vtn |
| 2015-08-12 11:02 |
|
Status | resolved => assigned |
| 2015-08-24 10:46 |
|
Note Added: 0044531 | |
| 2015-08-24 10:46 |
|
Assigned To | vtn => abv |
| 2015-08-24 10:46 |
|
Status | assigned => resolved |
| 2015-08-24 10:59 |
|
Status | resolved => assigned |
| 2015-12-30 11:51 |
|
Target Version | 7.1.0 => 7.0.0 |
| 2016-01-07 21:15 | git | Note Added: 0049716 | |
| 2016-01-07 21:16 |
|
Note Added: 0049717 | |
| 2016-01-07 21:16 |
|
Assigned To | abv => kgv |
| 2016-01-07 21:16 |
|
Status | assigned => resolved |
| 2016-01-08 10:35 | kgv | Note Added: 0049729 | |
| 2016-01-08 10:35 | kgv | Assigned To | kgv => bugmaster |
| 2016-01-08 10:35 | kgv | Status | resolved => reviewed |
| 2016-01-11 12:03 |
|
Assigned To | bugmaster => apv |
| 2016-01-12 15:20 |
|
Test case number | => Not needed |
| 2016-01-12 16:05 |
|
Note Added: 0049785 | |
| 2016-01-12 16:05 |
|
Assigned To | apv => bugmaster |
| 2016-01-12 16:05 |
|
Status | reviewed => tested |
| 2016-01-15 16:57 | bugmaster | Changeset attached | => occt master d868695f |
| 2016-01-15 16:57 | bugmaster | Status | tested => verified |
| 2016-01-15 16:57 | bugmaster | Resolution | open => fixed |
| 2016-01-21 11:06 |
|
Relationship added | parent of 0027100 |
| 2016-04-17 13:46 | git | Note Added: 0052943 | |
| 2016-04-17 13:46 | git | Note Added: 0052944 | |
| 2016-04-20 15:43 |
|
Fixed in Version | => 7.0.0 |
| 2016-04-20 15:50 |
|
Status | verified => closed |
| 2017-01-13 20:22 | kgv | Relationship added | related to 0027585 |