javascript - yuicompressor error, not sure what is wrong? -


There is a lot of confusion here, trying a yuicompressor on a simple JavaScript file.

Looks like my JS file:

  function split text (text) {return text.split ('-') [1]; } [Error] 1: 20: Invalid character [error] 1: is an error:  

[INFO] Use of charset cp1252

[Error] 1: 20 : Invalid character [Error] 1: 20: Syntax error [Error] 1: 40: Invalid character [Error] 1: 49: missing; [Error] 1: 50: Invalid character .. .. [Error] 7: 3: [Error] 1: 0 in compilation statement: Compilation 38 produces syntax errors ...

< P> Will someone tell me what is wrong?

Your encoding of the actual file is the issue YUICompressor is working on. Open the file in Notepad ++ and select ANSI & amp; it should work.

[


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -