View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0031171 | Open CASCADE | OCCT:DRAW | public | 2019-11-16 08:51 | 2020-12-02 17:12 |
Reporter | Assigned To | ||||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 7.4.0 | ||||
Target Version | 7.5.0 | Fixed in Version | 7.5.0 | ||
Summary | 0031171: Draw - support Unicode input / output in console on Windows | ||||
Description | Currently DRAW is not configured properly to deal with Unicode symbols when working interactively on Windows. When Unicode text is used in command or output, in most cases either the text is output corrupted, or output pipeline gets blocked. This can be fixed now for Windows 10 since it supports UTF8 codepage (65001). | ||||
Steps To Reproduce | Note: to be able to see non-Ascii symbols, make sure that the font used by the console supports these symbols. For the examples below, to be able to show hieroglyphs in the Windows' command window, I had to go to properties of the window, and on tab "Font" select "NSimSun" or "SimSun-ExtB" font. Method A: the following DRAW command should output hierogliphs in file name, translated to Chinese as "it works": test bugs fclasses bug22125 -echo Method B: the following commands defines Korean text translated as "triangulation", sets it as name to OCAF label and prints name from OCAF; hierogliphs should be correct at both places (see attached image): pload ALL set n [encoding convertfrom utf-8 "\xec\x82\xbc\xea\xb0\x81\x20\xeb\xb6\x84\xed\x95\xa0"] NewDocument D SetName D 0:1 $n GetName D 0:1 | ||||
Tags | No tags attached. | ||||
Test case number | bugs/fclasses/bug22125 | ||||
2019-11-16 15:37 manager |
bug31171_fixed.png (13,731 bytes) |
|
Branch CR31171 has been created by abv. SHA-1: 5201e76f6fc96e61b595a2999385fd599de21c1a Detailed log of new commits: Author: abv Date: Sat Nov 16 08:59:38 2019 +0300 0031171: Draw - support Unicode input / output in console on Windows System console is configured at DRAW start to use UTF-8 encoding, for cout and cin to deal correctly with Unicode symbols. Use of std::wcout is avoided as it leads to corrupted output. Command testgrid is improved to enforce UTF-8 encoding in child DRAW processes to preserve Unicode symbols in captured output. Test bugs fclasses bug22125 is refactored: - avoid dependency on external data file - avoid producing snapshot - check that Unicode name of the file created by OCCT procedure matches the name interpreted by Tcl functions |
|
Branch CR31171 has been updated forcibly by abv. SHA-1: 68eb42b5ada60de52935583b8152445715075d77 |
|
The fix is pushed to branch CR31171 and tested, see Jenkins job CR31171-abv; please review |
|
Branch CR31171 has been updated forcibly by abv. SHA-1: 660c58f42ba69ae29c36edbefb556ae07b2cff1c |
|
Rebased on new master |
|
--- a/src/Draw/Draw_Main.cxx +++ b/src/Draw/Draw_Main.cxx @@ -1,4 +1,4 @@ -// Created on: 1999-12-30 +\feff// Created on: 1999-12-30 Why BOM is suddenly needed here? |
|
Oops, my mistake |
|
Branch CR31171 has been updated forcibly by abv. SHA-1: 8f00325d73ba7521020db6e201786eaeab48cb75 |
|
Encoding of Draw_Main.cxx is corrected; alas the tools I normally use for viewing diffs do not show the changes in BOM... |
|
Combination - OCCT branch : WEEK-47 master SHA - 01ba59e958df3e8d3e19f5705a6e40d5574ee0c3 5f5b1aed1c6e139bbd34314eca77ae7abcd8895c Products branch : WEEK-47 SHA - 0585a8b491d06a1c800faf77c3b79decb046c24f was compiled on Linux, MacOS and Windows platforms and tested in optimize mode. Number of compiler warnings: No new/fixed warnings Regressions/Differences/Improvements: No regressions/differences CPU differences: Debian80-64: OCCT Total CPU difference: 16830.62000000013 / 16823.120000000046 [+0.04%] Products Total CPU difference: 10816.570000000062 / 10787.080000000053 [+0.27%] Windows-64-VC14: OCCT Total CPU difference: 18301.015625 / 18299.59375 [+0.01%] Products Total CPU difference: 12814.90625 / 12853.21875 [-0.30%] Image differences : No differences that require special attention Memory differences : No differences that require special attention |
|
Branch CR31171 has been deleted by inv. SHA-1: 8f00325d73ba7521020db6e201786eaeab48cb75 |
occt: master 8f00325d 2019-11-16 05:59:38
Committer: abv Details Diff |
0031171: Draw - support Unicode input / output in console on Windows System console is configured at DRAW start to use UTF-8 encoding, for cout and cin to deal correctly with Unicode symbols. Use of std::wcout is avoided as it leads to corrupted output. Command testgrid is improved to enforce UTF-8 encoding in child DRAW processes to preserve Unicode symbols in captured output. Test bugs fclasses bug22125 is refactored: - avoid dependency on external data file - avoid producing snapshot - check that Unicode name of the file created by OCCT procedure matches the name interpreted by Tcl functions |
Affected Issues 0031171 |
|
mod - src/Draw/CommandWindow.cxx | Diff File | ||
mod - src/Draw/Draw.cxx | Diff File | ||
mod - src/Draw/Draw_Interpretor.cxx | Diff File | ||
mod - src/Draw/Draw_Main.cxx | Diff File | ||
mod - src/DrawResources/TestCommands.tcl | Diff File | ||
mod - tests/bugs/fclasses/bug22125 | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2019-11-16 08:51 |
|
New Issue | |
2019-11-16 08:51 |
|
Assigned To | => apn |
2019-11-16 15:36 |
|
Steps to Reproduce Updated | |
2019-11-16 15:37 |
|
Relationship added | related to 0014673 |
2019-11-16 15:37 |
|
File Added: bug31171_fixed.png | |
2019-11-16 15:43 |
|
Steps to Reproduce Updated | |
2019-11-16 15:44 |
|
Description Updated | |
2019-11-16 16:45 | git | Note Added: 0089017 | |
2019-11-16 18:44 | git | Note Added: 0089028 | |
2019-11-16 18:45 |
|
Note Added: 0089029 | |
2019-11-16 18:45 |
|
Status | new => resolved |
2019-11-16 18:45 |
|
Assigned To | apn => kgv |
2019-11-16 19:56 | git | Note Added: 0089030 | |
2019-11-16 19:56 |
|
Note Added: 0089031 | |
2019-11-17 11:34 | kgv | Note Added: 0089032 | |
2019-11-17 16:28 |
|
Note Added: 0089033 | |
2019-11-17 17:54 | git | Note Added: 0089034 | |
2019-11-17 17:56 |
|
Note Added: 0089035 | |
2019-11-18 11:44 | kgv | Assigned To | kgv => bugmaster |
2019-11-18 11:44 | kgv | Status | resolved => reviewed |
2019-11-18 11:44 | kgv | Product Version | => 7.4.0 |
2019-11-18 19:17 | bugmaster | Test case number | => bugs/fclasses/bug22125 |
2019-11-20 17:05 | bugmaster | Note Added: 0089104 | |
2019-11-20 17:05 | bugmaster | Status | reviewed => tested |
2019-11-24 11:21 |
|
Changeset attached | => occt master 8f00325d |
2019-11-24 11:21 |
|
Assigned To | bugmaster => abv |
2019-11-24 11:21 |
|
Status | tested => verified |
2019-11-24 11:21 |
|
Resolution | open => fixed |
2019-11-24 11:35 | git | Note Added: 0089181 | |
2020-12-02 16:41 |
|
Fixed in Version | => 7.5.0 |
2020-12-02 17:12 |
|
Status | verified => closed |