jboecker / dcs-mission-planner

A browser-based multiplayer mission planner for DCS: World
24 stars 6 forks source link

Some missions are stuck on 'processing mission...' when creating instance #11

Closed morrtz closed 10 years ago

morrtz commented 10 years ago

Noticed that some of the missions I tried to load are stuck on 'processing mission...' after creating an instance.

Tested with online client and local client. Mission for example - https://copy.com/uNH9uQ0BSZNh

Browser debug shows -

status: hashing file... admintool.js:9 status: admintool.js:9 status: reading file... admintool.js:9 status: extracting mission... admintool.js:9 status: processing mission... admintool.js:9 stderr: [string "stdin"]:25726: unexpected symbol near weblua-0.1.5.js:1060 stderr: Parsing failure weblua-0.1.5.js:1060 stderr: [string "stdin"]:86: attempt to index global 'mission' (a nil value) weblua-0.1.5.js:1060 Uncaught SyntaxError: Unexpected token u admintool.js:56 (anonymous function) admintool.js:56 reader.onload

jboecker commented 10 years ago

weblua seems to have issues with non-ascii characters: https://github.com/campadrenalin/weblua/issues/17

I've committed a workaround to master that replaces every non-ascii character with a question mark. Of course this breaks any non-ascii text in the mission and might even break parts of DCS.

I can probably write a better workaround later that escapes non-ascii characters before passing stuff to Lua and unescapes it afterwards.