convert special characters in javascript file

761 Views Asked by At

I am using DocXTemplater for exporting table to word document

In the js file, there is a module with special characters, and CRM is not allowing me to create a file with these special characters. I tried removing the variables with special character, but the functionality is not working without them. How can I include the below binary special characters

28: [function(t, e, n) {
        "use strict";
        n.LOCAL_FILE_HEADER = "PK",
        n.CENTRAL_FILE_HEADER = "PK",
        n.CENTRAL_DIRECTORY_END = "PK",
        n.ZIP64_CENTRAL_DIRECTORY_LOCATOR = "PK",
        n.ZIP64_CENTRAL_DIRECTORY_END = "PK",
        n.DATA_DESCRIPTOR = "PK\b"
    }

enter image description here

1

There are 1 best solutions below

3
On

What exactly is crm not allowing you to do? Did you try adding the characters in these two ways?

[function(t, e, n) {
    "use strict";
    n.LOCAL_FILE_HEADER = "PK" + String.fromCharCode(3),
    n.CENTRAL_FILE_HEADER = "PK\x03",
}

If this works you can get a list of the characters you are seeing and transform them into unicode codes here: https://en.wikipedia.org/wiki/Control_character