You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After reading a text with special character '\X\80' becomes all texts with special characters unreadable
I have created this IFC ISSUE_RVT22_WithSpecialValue.zip that has a PSET at line 145 with a text that contents the character '\X\80'.
Also I have created the following code in node that is runnable if is placed at directory tests\issues in order to reproduce the error. The code reads PSET at line 146 with a text with special characters in SPAIN and it reads fine. Then it reads a PSET with a text that contents the character '\X\80' and finally it reads again PSET 146 and all special characters that were read fine before now it turns unreadable.
const fs = require("fs");
const WebIFC = require('../../dist/web-ifc-api-node');
let newIfcAPI = new WebIFC.IfcAPI();
async function test(){
await newIfcAPI.Init();
const content = fs.readFileSync("../ifcfiles/public/ISSUE_RVT22_WithSpecialValue.ifc");
let modelID = newIfcAPI.OpenModel(content);
// 1. Read PSET at line #146
let line=newIfcAPI.GetLine(modelID,146);
console.log("Parsed PSET value at line #146 :"+line.NominalValue.value + " -> Read speacial characters in SPAIN OK");
// 2. Read PSET at linr #145 with special character x80
line=newIfcAPI.GetLine(modelID,145);
console.log("Parsed PSET value at line #145 :"+line.NominalValue.value + " -> Reads special character x80 and ends with strange character");
// 3. Try to read again PSET at line #146
line=newIfcAPI.GetLine(modelID,146);
console.log("Parsed PSET value at line #146 :" +line.NominalValue.value + " -> This time the special characters becomes unreadable now");
newIfcAPI.CloseModel(modelID);
};
test();
The output is the following,
Parsed PSET value at line #146 :Válido, pestaña -> Read speacial characters in SPAIN OK
Parsed PSET value at line #146 :12888,43Ä -> Reads special character x80 and ends with strange character
Parsed PSET value at line #146 :V·lido, pestaÒa -> This time the special characters becomes unreadable now
Version
Latest
What browsers are you seeing the problem on?
No response
Relevant log output
Parsed PSET value at line #146 :Válido, pestaña -> Read speacial characters in SPAIN OK
Parsed PSET value at line #146 :12888,43Ä -> Reads special character x80 and ends with strange character
Parsed PSET value at line #146 :V·lido, pestaÒa -> This time the special characters becomes unreadable now
Anything else?
The IFC and code that reproduces the error is already attached
The text was updated successfully, but these errors were encountered:
jespa007
changed the title
[Bug]: After reading a text with speacial character '\X\80', GetLine return all texts with weird characters
[Bug]: After reading a text with speacial character '\X\80' becomes all texts with special characters unreadable
Aug 7, 2024
jespa007
changed the title
[Bug]: After reading a text with speacial character '\X\80' becomes all texts with special characters unreadable
[Bug]: After reading a text with special character '\X\80' becomes all texts with special characters unreadable
Aug 7, 2024
What happened?
After reading a text with special character '\X\80' becomes all texts with special characters unreadable
I have created this IFC ISSUE_RVT22_WithSpecialValue.zip that has a PSET at line 145 with a text that contents the character '\X\80'.
Also I have created the following code in node that is runnable if is placed at directory
tests\issues
in order to reproduce the error. The code reads PSET at line 146 with a text with special characters in SPAIN and it reads fine. Then it reads a PSET with a text that contents the character '\X\80' and finally it reads again PSET 146 and all special characters that were read fine before now it turns unreadable.The output is the following,
Version
Latest
What browsers are you seeing the problem on?
No response
Relevant log output
Anything else?
The IFC and code that reproduces the error is already attached
The text was updated successfully, but these errors were encountered: