title: "→" in string is causing error "Illegal XML character 001A was found in an SQL/XML expression" (DB2)
body: <p>I need to merge multiple rows from my database and to do it I need to get rid of some specific characters. I use following code:</p>
  <pre><code>  REPLACE(
          (CAST(XMLSERIALIZE(XMLAGG(XMLTEXT(
                CONCAT(RTNTXT.LIN_TX,'')
                                           )
                                   ) AS CLOB(10024)
                            ) AS VARCHAR(402)
               )
          ),'&amp;#x0d;',''
          )  AS NARRATIVE
  </code></pre>
  <p>Once in any of <code>&lt;mystring&gt;</code> records I have sign →, my query shows warning about illegal XML character 001A.</p>
  <p>I tried to use some google advice and transform code to:</p>
  <pre><code>  REPLACE(
          (CAST(XMLSERIALIZE(XMLAGG(XMLTEXT(
                CONCAT(RTNTXT.LIN_TX,'')
                                           )
                                   ) AS CLOB(10024)
                            ) AS VARCHAR(402)
               )
          ),x'1A',''
          )  AS NARRATIVE
  </code></pre>
  <p>but the error remains.</p>
  <p>Can you tell me what I can amend in syntax to make it work?</p>