• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Al Hobbs
  • Piet Souris
  • Himai Minh

Problems escaping XML with Apache Commons StringEscapeUtils

Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I've been trying to use the Apache commons StringEscapeUtils.escapeXml() to escape a string so that I can send it as an XML formatted request. The problem is that the characters between 128 and 255 all end up looking like: '�' in the escaped string. And since the string is supposed to be a filename, and that's "meaningless" in this context, the files end up not being found. In Python I use:

to escape the string, including quotes and apostrophes, but I can't seem to find a similar set of "utilities" for Java. Is there one?

Or is the problem simply a matter of character encoding?


    Bookmark Topic Watch Topic
  • New Topic