(In response to the foregoing)
OK, if you just want to exchange information, then you should use a data exchange format such as XML or JSON. I recommend JSON because it is lightweight, fast and very easy to use:
Computer 1
def map = [name:"Test :: ( %2f %25 \$ * & ! @ # ^)"] def json = new groovy.json.JsonBuilder() json(map) println json.toString()
Computer 2
def incoming = '{"name":"Test :: ( %2f %25 $ * & ! @ # ^)"}' def jsonInput = new groovy.json.JsonSlurper() def map = jsonInput.parseText(incoming) println map
Please note that they require Groovy 1.8.0 or later. There are many examples for older versions of Groovy, and Grails also has its own parsers.
source share