git-svn-id: https://svn.coded.pt/svn/SIPRP@1740 bb69d46d-e84e-40c8-a05a-06db0d633741

0'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z
Frederico Palma 14 years ago
parent 9abcb9eeae
commit 0ba4d2c502

@ -54,6 +54,7 @@ public class PlanosActuacaoImporter
private static void readProperties( String[] args ) throws Exception private static void readProperties( String[] args ) throws Exception
{ {
args = new String[]{ "/home/fpalma/workspace/PlanosActuacao/properties/0-Importer/app.properties" };
if ( args != null && args.length > 0 ) if ( args != null && args.length > 0 )
{ {
String filepath = args[ 0 ]; String filepath = args[ 0 ];

@ -26,10 +26,10 @@ public class Utils
public static String parseToInsert( String str ) public static String parseToInsert( String str )
{ {
String result = str; String result = str;
if ( result != null ) // if ( result != null )
{ // {
result = UnicodeChecker.parseToUnicode( result, true, true ); // result = UnicodeChecker.parseToUnicode( result, true, true );
} // }
return result; return result;
} }
@ -40,64 +40,70 @@ public class Utils
return text; return text;
} }
// text = UnicodeChecker.convertUnicode0100ToHTMLFromUser( text );
// text = UnicodeChecker.convertUnicode0200ToHTMLFromUser( text );
// text = UnicodeChecker.convertUnicode2000ToHTMLFromUser( text );
// text = UnicodeChecker.convertUnicodeLatin1ExtendedToHTMLFromUser( text );
// text = UnicodeChecker.convertUnicodeSpecialsToHTMLFromUser( text );
String output = text; String output = text;
output = output.replaceAll( "\\\\u0009", " " ); // output = output.replaceAll( "\\\\u0009", " " );
output = output.replaceAll( "\\\\u000a", "<br>" ); // output = output.replaceAll( "\\\\u000a", "<br>" );
//
output = output.replaceAll( "\\\\u00a0", "&nbsp;" ); // output = output.replaceAll( "\\\\u00a0", "&nbsp;" );
output = output.replaceAll( "\\\\u00aa", "&ordf;" ); // output = output.replaceAll( "\\\\u00aa", "&ordf;" );
output = output.replaceAll( "\\\\u00ba", "&ordm;" ); // output = output.replaceAll( "\\\\u00ba", "&ordm;" );
//
output = output.replaceAll( "\\\\u00c0", "À" ); // output = output.replaceAll( "\\\\u00c0", "<22>" );
output = output.replaceAll( "\\\\u00c1", "Á" ); // output = output.replaceAll( "\\\\u00c1", "<22>" );
output = output.replaceAll( "\\\\u00c2", "Â" ); // output = output.replaceAll( "\\\\u00c2", "<22>" );
output = output.replaceAll( "\\\\u00c3", "Ã" ); // output = output.replaceAll( "\\\\u00c3", "<22>" );
output = output.replaceAll( "\\\\u00c7", "Ç" ); // output = output.replaceAll( "\\\\u00c7", "<22>" );
output = output.replaceAll( "\\\\u00c8", "È" ); // output = output.replaceAll( "\\\\u00c8", "<22>" );
output = output.replaceAll( "\\\\u00c9", "É" ); // output = output.replaceAll( "\\\\u00c9", "<22>" );
output = output.replaceAll( "\\\\u00d3", "Ó" ); // output = output.replaceAll( "\\\\u00d3", "<22>" );
output = output.replaceAll( "\\\\u00d2", "Ò" ); // output = output.replaceAll( "\\\\u00d2", "<22>" );
//
output = output.replaceAll( "\\\\u00ca", "Ê" ); // output = output.replaceAll( "\\\\u00ca", "<22>" );
output = output.replaceAll( "\\\\u00cc", "Ì" ); // output = output.replaceAll( "\\\\u00cc", "<22>" );
output = output.replaceAll( "\\\\u00cd", "Í" ); // output = output.replaceAll( "\\\\u00cd", "<22>" );
output = output.replaceAll( "\\\\u00ce", "Î" ); // output = output.replaceAll( "\\\\u00ce", "<22>" );
output = output.replaceAll( "\\\\u00d2", "ò" ); // output = output.replaceAll( "\\\\u00d2", "<22>" );
output = output.replaceAll( "\\\\u00d3", "ó" ); // output = output.replaceAll( "\\\\u00d3", "<22>" );
output = output.replaceAll( "\\\\u00d4", "ô" ); // output = output.replaceAll( "\\\\u00d4", "<22>" );
output = output.replaceAll( "\\\\u00d5", "õ" ); // output = output.replaceAll( "\\\\u00d5", "<22>" );
output = output.replaceAll( "\\\\u00d9", "Ù" ); // output = output.replaceAll( "\\\\u00d9", "<22>" );
output = output.replaceAll( "\\\\u00da", "Ú" ); // output = output.replaceAll( "\\\\u00da", "<22>" );
output = output.replaceAll( "\\\\u00db", "Û" ); // output = output.replaceAll( "\\\\u00db", "<22>" );
//
output = output.replaceAll( "\\\\u00e0", "à" ); // output = output.replaceAll( "\\\\u00e0", "<22>" );
output = output.replaceAll( "\\\\u00e1", "á" ); // output = output.replaceAll( "\\\\u00e1", "<22>" );
output = output.replaceAll( "\\\\u00e2", "â" ); // output = output.replaceAll( "\\\\u00e2", "<22>" );
output = output.replaceAll( "\\\\u00e3", "ã" ); // output = output.replaceAll( "\\\\u00e3", "<22>" );
output = output.replaceAll( "\\\\u00e7", "ç" ); // output = output.replaceAll( "\\\\u00e7", "<22>" );
output = output.replaceAll( "\\\\u00e8", "è" ); // output = output.replaceAll( "\\\\u00e8", "<22>" );
output = output.replaceAll( "\\\\u00e9", "é" ); // output = output.replaceAll( "\\\\u00e9", "<22>" );
output = output.replaceAll( "\\\\u00ea", "ê" ); // output = output.replaceAll( "\\\\u00ea", "<22>" );
output = output.replaceAll( "\\\\u00ec", "ì" ); // output = output.replaceAll( "\\\\u00ec", "<22>" );
output = output.replaceAll( "\\\\u00ed", "í" ); // output = output.replaceAll( "\\\\u00ed", "<22>" );
output = output.replaceAll( "\\\\u00ee", "î" ); // output = output.replaceAll( "\\\\u00ee", "<22>" );
output = output.replaceAll( "\\\\u00f2", "ò" ); // output = output.replaceAll( "\\\\u00f2", "<22>" );
output = output.replaceAll( "\\\\u00f3", "ó" ); // output = output.replaceAll( "\\\\u00f3", "<22>" );
output = output.replaceAll( "\\\\u00f4", "ô" ); // output = output.replaceAll( "\\\\u00f4", "<22>" );
output = output.replaceAll( "\\\\u00f5", "õ" ); // output = output.replaceAll( "\\\\u00f5", "<22>" );
output = output.replaceAll( "\\\\u00f9", "ù" ); // output = output.replaceAll( "\\\\u00f9", "<22>" );
output = output.replaceAll( "\\\\u00fa", "ú" ); // output = output.replaceAll( "\\\\u00fa", "<22>" );
output = output.replaceAll( "\\\\u00fb", "û" ); // output = output.replaceAll( "\\\\u00fb", "<22>" );
//
output = output.replaceAll( "\\\\u0153", "&#156;" ); // output = output.replaceAll( "\\\\u0153", "&#156;" );
//
output = output.replaceAll( "\\\\u2013", "-" ); // output = output.replaceAll( "\\\\u2013", "-" );
output = output.replaceAll( "\\\\u2014", "-" ); // output = output.replaceAll( "\\\\u2014", "-" );
output = output.replaceAll( "\\\\u2018|\\\\u2019", "'" ); // output = output.replaceAll( "\\\\u2018|\\\\u2019", "'" );
output = output.replaceAll( "\\\\u201c|\\\\u201d", "\"" ); // output = output.replaceAll( "\\\\u201c|\\\\u201d", "\"" );
//
output = output.replaceAll( "\\\\u2022", "*" ); // output = output.replaceAll( "\\\\u2022", "*" );
output = output.replaceAll( "\\\\u2026", "..." ); // output = output.replaceAll( "\\\\u2026", "..." );
return output; return output;
} }

Loading…
Cancel
Save