Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : Steal build cannot handle utf-8 properly?

$
0
0
hi, it's not an issue about how I output the string.
The problem is the steal build system  totally discriminate against Chinese character. see the tiny sample code below.

I have removed the canjs and its templates

index.html
  1. <html>
  2. <head>
  3. <meta charset="UTF-8">
  4. <title>Evil String</title>
  5. </head>
  6. <body>
  7. <h1>Evil String<h2>
  8. <script src="../../steal/steal.js?demo/evilString/evil.js"></script>
  9. </body>
  10. </html>
evil.js
  1. steal(function(){
  2. var output = ":";
  3. console.log(output);
  4. });
building error
  1. Building to demo/evilString/
  2.   opening demo/evilString/index.html
  3. could not load script  file:///E:/temp_move/emanual2/public/demo/evilString/evil.js  
  4.   InternalError: Compilation produced 3 syntax errors. 
  5. !!!!!!!!!!! ERROR !!!!!!!!!!!

  6. -message    = Compilation produced 3 syntax errors.
  7. -fileName   = file:///E:/temp_move/emanual2/public/demo/evilString/evil.js
  8. -name       = InternalError
  9. -lineNumber = 0
  10.   adding dependencies
  11.   + stealconfig.js
  12.   + demo/evilString/evil.js
  13.  
  14.   no packages

  15. Building demo/evilString/production.js
  16. 82
  17. ERROR in demo/evilString/evil.js at line 2: ERROR - Parse error. unterminated string literal

  18. steal(function(){
  19. var output = "锛?;
  20. console.log(output);
you see I cannot put Chinese character anywhere if I want to use the steal build system. And I cannot persuade client to write their documents using \u6587\u7ae0\uff1a , either.

Viewing all articles
Browse latest Browse all 3491

Trending Articles