public static String encodeString(String s){
  s=StringUtil.gsub("\\","\\\\",s);
  s=StringUtil.gsub("\t","\\t",s);
  s=StringUtil.gsub("\n","\\n",s);
  s=StringUtil.gsub("\r","\\r",s);
  s=StringUtil.gsub("\"","\\\"",s);
  return s;
}

public static String encodeString ( String s ) { s = StringUtil . gsub ( "\\" , "\\\\" , s ) ; s = StringUtil . gsub ( "\t" , "\\t" , s ) ; s = StringUtil . gsub ( "\n" , "\\n" , s ) ; s = StringUtil . gsub ( "\r" , "\\r" , s ) ; s = StringUtil . gsub ( "\"" , "\\\"" , s ) ; return s ; }
encodes the supplied string for inclusion as a ' normal ' string in a turtle document .
