ERRCODE TFormer_SetHandleEscapeSequences ( HTFORM  pInstance,
BOOL  bOn 
)

Selects whether escape sequences like \n or \x40 should be translated by TFORMer.

Returns:
- ErrOk (0) in case of success
- Non-zero if error occurred
Parameters:
[in] pInstance The TFORMer-Instance provided by a previous call to TFormer_Init.
[in] bOn Should escape sequences be translated?
Remarks:
The default value is FALSE. That means TFORMer uses DataField-values exactly as provided by the application, the user or the DataSource. But in some cases it is required to translate JavaScript-style escape sequences into their corresponding binary representation. If set to TRUE, escape sequences in DataField values will be translated. This method influences all subsequent calls to TFormer_SetXXXDataFile or TFormer_SetVarValue.
Each escape sequence begins with a leading backslash. The following escape sequences are supported by TFORMer:
Translated Escape Sequences
Sequence Character
\' Single quotation mark
\" Double quotation mark
\\\ Backslash
\b Backspace
\f Form feed
\n New line
\r Carriage return
\t Horizontal tab
\ddd Octal sequence (3 digits: ddd)
\xdd Hexadecimal sequence (2 digits: dd)
\udddd Not implemented in this TFORMer Version. Unicode sequence (4 hex digits: dddd)
In case of an invalid escape sequence (e.g. \q, \999, \129, \xgg) the backslash is ignored. No error will be raised.
Invalid Escape Sequences
Invalid Escape Sequence in Data Result
\q q
\999 999
\609 09
\xgg xgg
\ Empty string

See also:
TFormer_SetVarValue.


© 2006-2009 - all rights reserved by TEC-IT Datenverarbeitung GmbH
Generated on Wed Sep 2 16:01:09 2009 for TFORMer Runtime DLL/Shared Library with doxygen 1.5.8