Lost escape sequences

When i deserialize a string type property which contents "rn" data,  i’ve lost a ‘n'(‘new line’). As a result was text data’s bad formatting.
This problem was solved by replacing with the regular expression "(?<!\r)\n".

public string Note




//HACK: При сериализации символ rn заменяется на n

//восстанавливаем первоначальные значения

_note =

Regex.Replace(_note, "(?<!\r)\n", "rn");

return _note;


set { _note = value; }



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s