public static String getCRLFEscape(String str){
		StringBuffer result = new StringBuffer();
		
		if(str != null){
			StringCharacterIterator iterator = new StringCharacterIterator(str);
			char character =  iterator.current();
			while (character != CharacterIterator.DONE ){
				if(Character.getType(character) != 15){
					
					if(Character.getType(character) == 28){
						result.append(" ");
					} else {
						switch (character) {
						case '\n':
						result.append("\n");
						    break;
						
						case '\t':
						result.append(" ");
						    break;
						
						case '\r':                
						result.append(" ");
						    break;
						    
						default :
							result.append(character);
							break;
							
						}
					}
				} else {
					if(character == '\n' || character == '\r'){
						result.append("\n");
					} else {
						result.append(" ");
					}
				}
				character = iterator.next();
			}
		}
		return result.toString();
	}