1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-07-30 13:05:50 +03:00
occt/tests/bugs/step/bug31670
dpasukhi baf60a870c 0031670: Data Exchange - cp1251 Cyrillic characters in STEP file
Add support for converting pages from Windows encoding to Unicode
2020-10-06 20:40:26 +03:00

23 lines
687 B
Plaintext

puts "================"
puts "0031670: Data Exchange - cp1251 Cyrillic characters in STEP file"
puts "================"
puts ""
pload OCAF
# Read file
param read.stepcaf.codepage CP1251
ReadStep D [locate_data_file bug31670_russian.stp]
# Checking
set aNameAssambly [encoding convertfrom utf-8 "\xd0\xa1\xd0\xb1\xd0\xbe\xd1\x80\xd0\xba\xd0\xb0\x31"]
set aNameShape [encoding convertfrom utf-8 "\xd0\x94\xd0\xb5\xd1\x82"]
set isOK 1
if { [GetName D 0:1:1:1] != "$aNameAssambly" } { set isOK 0 }
for { set i 1 } { $i < 9 } { incr i } {
if { [GetName D 0:1:1:[expr $i + 1]] != "$aNameShape$i" } { set isOK 0 }
}
if { $isOK == 0 } { puts "Error: unable to read CP1251 STEP" }
Close D