I am curious to know what is the most common approach to remove non-ascii and to encode special characters to make PDF export work properly?
The matter is I have separate processing of client-side and server-side grids: changing text, cutting something with regexp, etc.
item[column].Text = HttpContext.Current.Server.Encode(item[column].Text)
in dozen of places of ItemDataBound event is not very comfortable. Besides, this Encode
method does not help with non-ascii characters, for them I have to use
Regex.Replace(description.ToString(), @"[^\u001F-\u007F]", string.Empty)
I would prefer something like PdfExporting event and replace e.RawHTML. But it's tricky, cause I need to replace cell content,
not HTML tags...
Br-r-r, looks too clumsy.