Skip to content
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

Problem with displaying Cyrillic characters in the BPMN scheme #1

Open
kucher-racer opened this issue Nov 6, 2024 · 0 comments
Open

Comments

@kucher-racer
Copy link

There is a problem with displaying Cyrillic characters in the BPMN scheme
error_cirilic
this happens when decoding base64 via the atob function, please add another decoding function

worked example:
const xml = decodeBase64ToUtf8(props.diagramData);

function decodeBase64ToUtf8(base64) {
// decode base64 in binary data
const binaryString = atob(base64);

// Convert array byte
const binaryLen = binaryString.length;
const bytes = new Uint8Array(binaryLen);
for (let i = 0; i < binaryLen; i++) {
bytes[i] = binaryString.charCodeAt(i);
}

// Decode bytes as UTF-8
const decoder = new TextDecoder('utf-8');
return decoder.decode(bytes);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant