filtering Invalid characters in output 
Author Message
 filtering Invalid characters in output

Hi, I'm selecting data out of a logging table using FOR XML. The output is
giving badly formed XML and I've discovered it's because one of the fields
is populated by information from Fax Machines identity information (usually
their telephone number etc).
Somehow, one of them has put an ASCII 17 (0x11) character which is "Device
Control 1" and when parsing it through the MSXML2 object it rejects it with
"An invalid character was found in text content.". By default it seems
SQLServer is using encoding="utf-8". Is there any way I can get the parser
to accept this (and probably other characters like this) that may have been
put into the logging table? The only other option I suppose is to filter out
these characters before passing the string to the MSXML2 object - is there a
list somewhere of invalid (or valid) characters for the utf-8 encoding set I
could use for such a filter?

Many thanks for any suggestions.
 -=- Brett



Sat, 28 Feb 2004 18:11:38 GMT
 filtering Invalid characters in output

Only data in binary columns is being base64 encoded and is therefore safe
with respect to XML. For performance reasons the data in other type of
columns is assumed to contain valid XML characters and is passed "as is"
into the resulting XML.


Quote:
> Hi, I'm selecting data out of a logging table using FOR XML. The output is
> giving badly formed XML and I've discovered it's because one of the fields
> is populated by information from Fax Machines identity information
(usually
> their telephone number etc).
> Somehow, one of them has put an ASCII 17 (0x11) character which is "Device
> Control 1" and when parsing it through the MSXML2 object it rejects it
with
> "An invalid character was found in text content.". By default it seems
> SQLServer is using encoding="utf-8". Is there any way I can get the parser
> to accept this (and probably other characters like this) that may have
been
> put into the logging table? The only other option I suppose is to filter
out
> these characters before passing the string to the MSXML2 object - is there
a
> list somewhere of invalid (or valid) characters for the utf-8 encoding set
I
> could use for such a filter?

> Many thanks for any suggestions.
>  -=- Brett



Wed, 17 Mar 2004 00:51:57 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. invalid - invalid character error

2. Can use SP to filter invalid email addr.?

3. Filtered Merge Replication 'Invalid Column Name'

4. Invalid filter in WHERE clause

5. Help! - Invalid Arg Error - using Filter w/ Recordset

6. Filtering on Pivot table Output in Excell......

7. Filtering stderr and stdout output from DBaccess.

8. Word Wrapping XML output making invalid XML

9. Stored Proc , filtering & swedish characters

10. Filter & Swedish characters

11. National character filtering

12. Invalid username characters and permissions assignments


 
Powered by phpBB® Forum Software