diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2010-10-05 19:11:17 +0200 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2010-10-05 19:11:17 +0200 |
commit | fb98253ab312683294fd36b37644d0b0de6e04df (patch) | |
tree | 0a229aa26e9cb128cf2650de0dac5c80ec3ae5cc /l10ntools | |
parent | 60d81d7214173faec846f89f41db88ee073e4e81 (diff) |
ooo330l10n4: fixed encoding, windows path issue
Diffstat (limited to 'l10ntools')
-rw-r--r-- | l10ntools/java/jpropex/java/JPropEx.java | 11 | ||||
-rw-r--r-- | l10ntools/java/jpropex/java/SdfData.java | 2 | ||||
-rw-r--r-- | l10ntools/java/jpropex/java/SdfEntity.java | 1 |
3 files changed, 8 insertions, 6 deletions
diff --git a/l10ntools/java/jpropex/java/JPropEx.java b/l10ntools/java/jpropex/java/JPropEx.java index f068f93ad18b..9ff8bf96fe44 100644 --- a/l10ntools/java/jpropex/java/JPropEx.java +++ b/l10ntools/java/jpropex/java/JPropEx.java @@ -141,9 +141,12 @@ public class JPropEx private SdfEntity prepareSdfObj( String filename ) { - String path = makeAbs( filename ); - //String path = makeAbs( inputFileArg ); - path = path.replace( rootArg + "/" , "" ); + String path = makeAbs( filename ).trim(); + String myRootArg = makeAbs( rootArg ).trim(); + myRootArg = myRootArg.replace( "\\","/"); + myRootArg += "/"; + path = path.replace("\\","/"); + path = path.replace( myRootArg, "" ); path = path.replace("/","\\"); // TODO: Make this static java.text.SimpleDateFormat dateformat = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); @@ -176,7 +179,7 @@ public class JPropEx { BufferedReader in = new BufferedReader( new FileReader( filename.substring( 1 ) ) ); while( in.ready() ) - lines.add( in.readLine() ); + lines.add( in.readLine().trim() ); } catch( IOException e ) { diff --git a/l10ntools/java/jpropex/java/SdfData.java b/l10ntools/java/jpropex/java/SdfData.java index 6f79909df1b2..98eddbeca20f 100644 --- a/l10ntools/java/jpropex/java/SdfData.java +++ b/l10ntools/java/jpropex/java/SdfData.java @@ -68,7 +68,7 @@ public class SdfData BufferedReader in; try { - in = new BufferedReader( new FileReader( filename ) ); + in = new BufferedReader( new InputStreamReader( new FileInputStream( filename ), "UTF-8" ) ); SdfEntity entity; while( in.ready() ) { diff --git a/l10ntools/java/jpropex/java/SdfEntity.java b/l10ntools/java/jpropex/java/SdfEntity.java index c2f6a5d788b1..7723238815e7 100644 --- a/l10ntools/java/jpropex/java/SdfEntity.java +++ b/l10ntools/java/jpropex/java/SdfEntity.java @@ -97,7 +97,6 @@ public class SdfEntity implements Cloneable{ } public void setProperties( String line ){ - if( line != null ) { String[] splitted = line.split("\t",15); |