Closed GoogleCodeExporter closed 9 years ago
Did you built jN.dll from newest sources? If yes get the newest sources jN
directory. I changed addScript method adding new parameter (path to file to be
added). It allows to debug scripts in VS or MS Script Debugger and see loaded
files.
Original comment by eugen.kr...@gmail.com
on 24 Sep 2013 at 9:30
Can you provide script file causing that issue?
Original comment by eugen.kr...@gmail.com
on 24 Sep 2013 at 7:25
Maybe i find the problem, it's the file encoding.
I compare the script files, the files that causing the issue are UTF-8
encoding, and i transform them to ANSI as UTF-8(UTF-8 without BOM), then no
errors there.
files: path: nppdir\plugins\jN\includes\
clearcase.js
run.js
svn.js
tests.menu.js
Zen Coding.js
I remember that i had got the same issue before in IE6, does the plugin's
JScript engine is the same as the IE6's?
Original comment by Aluc...@gmail.com
on 25 Sep 2013 at 2:24
The plugin uses actually installed MS Script Engine specially JScript
implementation. It should be the same that IE is using. What IE version do you
have?
What do you see, if you run following script in Npp (Ctrl+N, paste following
script, F5)
function GetScriptEngineInfo(){
var s;
s = ""; // Build string with necessary info.
s += ScriptEngine() + " Version ";
s += ScriptEngineMajorVersion() + ".";
s += ScriptEngineMinorVersion() + ".";
s += ScriptEngineBuildVersion();
return(s);
}
alert(GetScriptEngineInfo());
I see "JScript Version 5.8.17866"
Original comment by eugen.kr...@gmail.com
on 25 Sep 2013 at 7:02
JScript Version 5.7.22589
Original comment by Aluc...@gmail.com
on 25 Sep 2013 at 10:30
IE6
Original comment by Aluc...@gmail.com
on 25 Sep 2013 at 10:45
Strange! I began jN development on windows XP and it worked with old IE
version. I would close this issue, because you found a workaround.
If you can reproduce this issue you can try to replace include method in
start.js by following test it again.
include : function (file){
if (this.fso.FileExists(file)){
var stream = new ActiveXObject("ADODB.Stream");
stream.Charset = "UTF-8";
stream.Open();
stream.LoadFromFile(file);
var scr = stream.ReadText();
stream.close();
try{
addScript(scr);
}catch(e){
this.errors.push(e);
}
}
},
Original comment by eugen.kr...@gmail.com
on 26 Sep 2013 at 6:08
I replace the method and i cannot reproduce this issue again.
But, another issue happened.
I created a script file with encoding GB2312, and i wrote some GB2312
characters like "你好", run this code snippet:
Editor.alert("你好");
actually the Editor alert the white space.
When i close npp, open it after a while, i saw that text trasform to encoding
UTF-8.
I try some other similer case, for example, first i use encoding UTF-8 with out
BOM, then do the same things, and the file transform to ANSI encoding finally.
Original comment by Aluc...@gmail.com
on 26 Sep 2013 at 7:09
Very strange! But does not have anything with jN-plugin. Plugin tries
explicitly to load all of scripts as UTF-8 encoded. I chose this encoding
because it is a natural encoding for Npp. But I get a BOM problem :-).
Original comment by eugen.kr...@gmail.com
on 26 Sep 2013 at 8:44
Original comment by eugen.kr...@gmail.com
on 2 Oct 2013 at 8:09
Original issue reported on code.google.com by
Aluc...@gmail.com
on 24 Sep 2013 at 6:11