Opened 15 years ago

Closed 15 years ago

Last modified 12 years ago

#263 closed defect (fixed)

Inconsistent file encoding breaks spidermonkey on Mac OS X

Reported by: espes Owned by:
Priority: Should Have Milestone: Pre-Alpha 1
Component: Non-game systems Keywords:
Cc: Patch:

Description

exe name before realpath: /Volumes/Data/Development/Compiling/0AD/trunk/binaries/system/./pyrogenesis_dbg
exe name after realpath: /Volumes/Data/Development/Compiling/0AD/trunk/binaries/system/./pyrogenesis_dbg
returning exe name: /Volumes/Data/Development/Compiling/0AD/trunk/binaries/system/pyrogenesis_dbg
TIMER| InitVfs: 1.603 ms
TIMER| InitScripting: 7.995 ms
TIMER| CONFIG_Init: 8.452 ms
TIMER| write_sys_info: 1.098 ms
TIMER| ps_console: 17.498 ms
TIMER| ps_lang_hotkeys: 6.716 ms
TIMER| ps_gui_init: 187 us
TIMER| ps_gui_setup_xml: 4.976 ms
TIMER| ps_gui_styles_xml: 2.096 ms
TIMER| ps_gui_sprite1_xml: 61.773 ms
(current document)(0): malformed UTF-8 character sequence at offset 25199
ERROR: JavaScript Error ((current document), line 0): malformed UTF-8 character sequence at offset 25199
terminate called after throwing an instance of 'PSERROR_Scripting_LoadFile_EvalErrors'
  what():  Scripting_LoadFile_EvalErrors
Abort trap

I eventually tracked this down to gui/test/functions_page_session_status_commands.js, which was in some ISO-* encoding, instead of UTF-8. This problem exists for quite a few other files as well. Spidermonkey fails to parse them, and dies.

Change History (7)

comment:1 by espes, 15 years ago

Priority: minormajor

comment:2 by espes, 15 years ago

Type: taskdefect

comment:3 by Philip Taylor, 15 years ago

Resolution: fixed
Status: newclosed

Fixed functions_page_session_status_commands.js in r6995 (by changing it to ASCII). Thanks!

I can't find the problem in any other files - all the .xml and .js seem to be purely ASCII, except for some XML that's explicitly iso-8859-1 or that has a UTF-8 BOM. I'll mark this as fixed now, but please reopen it if there are files I missed.

comment:4 by espes, 15 years ago

Resolution: fixed
Status: closedreopened

Thanks. The other one that causes issues is the "tips.txt" file.

And thanks for converting the line endings too, silly windows and its \r\n

comment:5 by Philip Taylor, 15 years ago

Resolution: fixed
Status: reopenedclosed

Oh, didn't notice that one. Changed to UTF-8 now, and changed the relevant code to decode as UTF-8, so it should be okay now (unless I missed any others!)

comment:6 by (none), 14 years ago

Milestone: Open Source Release

Milestone Open Source Release deleted

comment:7 by historic_bruno, 12 years ago

Milestone: Pre-Alpha 1
Note: See TracTickets for help on using tickets.