Feb 062013
 

This goes into the ‘saves time’ cat­egory and is slightly too long to fit into 140 char­ac­ters.

If you’re using XSLT on some XML file that has had a mis­cel­laneous his­tory and you see the error Illegal HTML character: decimal 146 (or some­thing sim­il­ar), don’t pan­ic or break out your hex view­er to try to find the ran­dom char­ac­ter that’s caus­ing the prob­lem.

Get jEd­it instead. Open the file in jEd­it, and go to the menu Util­it­ies -> Buf­fer Options. In the char­ac­ter encod­ing drop-down, choose Windows-1252. The error message(s) will point you right at the offend­ing character(s). For added fun, repeat with ISO-8859–1 to flush out oth­er odd char­ac­ters that aren’t illeg­al, but may not show up cor­rectly depend­ing on your down-stream pro­cessing (lig­at­ures, etc.). Then switch back to UTF-8 or whatever you need, save, and you’re done!

JEd­it also has decent XML fea­tures if you install the plu­gins, an added bonus.

  One Response to “Tracking down decimal 146”

  1. Good advice — I am cur­rently using Liquid XML instead of Spy or Oxy­gen because *those* licenses were appar­ently pur­chased by my pre­vi­ous pro­ject; but in a lot of ways I got more mileage out of Jed­it than any of the oth­ers, par­tic­u­larly the XQuery, XSLT and Web­Dav plu­gins. Very use­ful with nat­ive XML data­bases like exist too.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)