-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
String encoding - problem with special characters #58
Comments
Quick and dirty solution on the JavaScript side: function DecodeIFCString (ifcString)
{
const ifcUnicodeRegEx = /\\X2\\(.*?)\\X0\\/uig;
let resultString = ifcString;
let match = ifcUnicodeRegEx.exec (ifcString);
while (match) {
const unicodeChar = String.fromCharCode (parseInt (match[1], 16));
resultString = resultString.replace (match[0], unicodeChar);
match = ifcUnicodeRegEx.exec (ifcString);
}
return resultString;
} |
Thank you @kovacsv! It solves the problem. |
This issue is now a bounty. Whoever solves this will get $100. More information here. |
P21 string encoding support (Issue #58)
Hello @agviegas, is this issue already integrated in the web-ifc-viewer? |
Hi @hikitan1 we are setting up the bounties for the rest of the year, and this is one of them, so yes. |
Hello everyone, Is it any possible way to use decoder from @deadman2000 with provided javascript API? |
Hi @yakovlevkll what do you mean? This was already merged. |
Thank you for your reply @agviegas! I found the problem with the version of |
Hi everyone,
I confirm that with v1 the characters are ok, but not translated with v2. I don't know for what obscure reason the Express Data was replaced by ODA !? |
Hm, that's strange. Have you asked them? If it's a different encoding, maybe we should make a flexible system that accepts all possible encodings when reading strings. |
@Tamu awesome. If you find any problems with that, don't hesitate to create a new issue in this repo so that we can help you out. Cheers! |
Hi,
I have an issue displaying special characters (ç, é). I am using the encoding utf8 in the web page.
The string name came that way in json.
The text was updated successfully, but these errors were encountered: