CSV escaping.
This commit is contained in:
parent
1bad72f14f
commit
582c133835
|
@ -245,6 +245,15 @@ wxString EscapeString( const wxString& aSource, ESCAPE_CONTEXT aContext )
|
|||
else
|
||||
converted += c;
|
||||
}
|
||||
else if( aContext == CTX_CSV )
|
||||
{
|
||||
if( c == ',' )
|
||||
converted += wxT( "{comma}" );
|
||||
else if( c == '\n' || c == '\r' )
|
||||
converted += wxT( "{return}" );
|
||||
else
|
||||
converted += c;
|
||||
}
|
||||
else
|
||||
{
|
||||
converted += c;
|
||||
|
|
|
@ -56,6 +56,7 @@ enum ESCAPE_CONTEXT
|
|||
CTX_IPC,
|
||||
CTX_QUOTED_STR,
|
||||
CTX_LINE,
|
||||
CTX_CSV,
|
||||
CTX_FILENAME,
|
||||
CTX_NO_SPACE // to replace spaces in names that do not accept spaces
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue