Copy link to clipboard
Copied
Hi,
I am trying to open a JSON file from a CEP panel.
File open dialog works fine and returns a file name like c:/tmp/test.json
readFile(filename, cep.encoding.UTF8) results in an error 2 (invalid parameter)
The json was saved with a writeFile call before and looks fine - it contains extended characters and has no BOM
What could be wrong?
Copy link to clipboard
Copied
Hi,
Try the following
var data = cep.fs.readFile(file);
file - complete path to the file. In your case C:/tmp/test.json
Copy link to clipboard
Copied
Hi,
I tried that first, then I added the second parameter
Kind regards
Copy link to clipboard
Copied
So, it doesn't work for you?