Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 350109 - config strings with embedded escapes result in uncompilable generated .c
Summary: config strings with embedded escapes result in uncompilable generated .c
Status: ASSIGNED
Alias: None
Product: RTSC
Classification: Technology
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Dave Russo CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-22 20:50 EDT by Dave Russo CLA
Modified: 2011-11-24 12:58 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Russo CLA 2011-06-22 20:50:59 EDT
A config string with an embedded escape will cause the generated .c configuration file to be uncompilable.  Foe example, "hello world\n" will be translated into a string with \n replaced by a single new line.  When writing to the generated C file, this results in a an illegal C initialization.

We need to "undo" the translation performed by JavaScript and convert into the appropriate C digraphs (where possible).  

The workaround it to always escape the escape sequences interpreted by JavaSctip.  In the case above, "hello world\n" would be written as "hello world\\n".