Page 1 of 1

Need help:About charset,encoding and page display

Posted: 2012-03-28 11:11 am
by ask
As to unfamiliar with JSCoverage, need expert suggestions.

After instrumenting source code of page in charset "EUC-JP" with the command like "jscoverage /SOURCE-DIR /DESTINATION-DIR",
Japanese characters in .JS files are not displayed in proper form and unreadable.

However, try to apply the command as the following: "jscoverage --encoding=EUC-JP /SOURCE-DIR /DESTINATION-DIR",
there are compiling errors indicated, like "jscoverage: error decoding EUC-JP in file ...".

Are there any methods to deal with the problem of Japanese character encoding for jscoverage instrument?

Expecting a reply.Thanks.

Re: Need help:About charset,encoding and page display

Posted: 2012-03-28 4:19 pm
by Ed
Note that the --encoding option has really only been tested with UTF-8 and ISO-8859-1; there may be bugs handling other character sets, although I believe EUC-JP should work.
ask wrote:However, try to apply the command as the following: "jscoverage --encoding=EUC-JP /SOURCE-DIR /DESTINATION-DIR",
there are compiling errors indicated, like "jscoverage: error decoding EUC-JP in file ...".
It sounds like the .js file mentioned in the error message is not using the EUC-JP encoding ... are you sure that the .js file is really EUC-JP?

Re: Need help:About charset,encoding and page display

Posted: 2012-03-29 5:56 am
by ask
Thanks for your suggestion. It seems the error exists in the file encoding.