directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r748536 - in /directory/studio/trunk: ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/ test-integration-ui/src/main/java/org/apache/direct...
Date Fri, 27 Feb 2009 14:17:04 GMT
Author: seelmann
Date: Fri Feb 27 14:17:04 2009
New Revision: 748536

URL: http://svn.apache.org/viewvc?rev=748536&view=rev
Log:
Fixed some encoding issues

Modified:
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportDsmlJob.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlJob.java
    directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/ParserUtils.java
    directory/studio/trunk/test-integration-ui/src/main/java/org/apache/directory/studio/test/integration/ui/ImportExportTest.java

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportDsmlJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportDsmlJob.java?rev=748536&r1=748535&r2=748536&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportDsmlJob.java
(original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportDsmlJob.java
Fri Feb 27 14:17:04 2009
@@ -193,7 +193,7 @@
             if ( dsmlExportString != null )
             {
                 FileOutputStream fos = new FileOutputStream( exportDsmlFilename );
-                OutputStreamWriter osw = new OutputStreamWriter( fos );
+                OutputStreamWriter osw = new OutputStreamWriter( fos, "UTF-8" );
                 BufferedWriter bufferedWriter = new BufferedWriter( osw );
                 bufferedWriter.write( dsmlExportString );
                 bufferedWriter.close();

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlJob.java?rev=748536&r1=748535&r2=748536&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlJob.java
(original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlJob.java
Fri Feb 27 14:17:04 2009
@@ -208,7 +208,7 @@
             if ( responseFile != null )
             {
                 FileOutputStream fos = new FileOutputStream( responseFile );
-                OutputStreamWriter osw = new OutputStreamWriter( fos );
+                OutputStreamWriter osw = new OutputStreamWriter( fos, "UTF-8" );
                 BufferedWriter bufferedWriter = new BufferedWriter( osw );
                 bufferedWriter.write( batchResponseDsml.toDsml() );
                 bufferedWriter.close();

Modified: directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/ParserUtils.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/ParserUtils.java?rev=748536&r1=748535&r2=748536&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/ParserUtils.java
(original)
+++ directory/studio/trunk/studio-dsml-parser/src/main/java/org/apache/directory/studio/dsmlv2/ParserUtils.java
Fri Feb 27 14:17:04 2009
@@ -32,6 +32,7 @@
 import org.apache.directory.shared.ldap.codec.Control;
 import org.apache.directory.shared.ldap.ldif.LdifUtils;
 import org.apache.directory.shared.ldap.util.Base64;
+import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.studio.dsmlv2.engine.Dsmlv2Engine;
 import org.apache.directory.studio.dsmlv2.request.BatchRequest;
 import org.apache.directory.studio.dsmlv2.request.BatchRequest.Processing;
@@ -149,7 +150,7 @@
         }
         else if ( value instanceof String )
         {
-            return new String( Base64.encode( ( ( String ) value ).getBytes() ) );
+            return new String( Base64.encode( StringTools.getBytesUtf8( ( String ) value
) ) );
         }
 
         return "";

Modified: directory/studio/trunk/test-integration-ui/src/main/java/org/apache/directory/studio/test/integration/ui/ImportExportTest.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/test-integration-ui/src/main/java/org/apache/directory/studio/test/integration/ui/ImportExportTest.java?rev=748536&r1=748535&r2=748536&view=diff
==============================================================================
--- directory/studio/trunk/test-integration-ui/src/main/java/org/apache/directory/studio/test/integration/ui/ImportExportTest.java
(original)
+++ directory/studio/trunk/test-integration-ui/src/main/java/org/apache/directory/studio/test/integration/ui/ImportExportTest.java
Fri Feb 27 14:17:04 2009
@@ -95,6 +95,7 @@
 		eBot.button("Finish").click();
 
 		// verify that exported LDIF starts with the Base64 encoded DN
+		eBot.sleep(2000);
 		String content = FileUtils.readFileToString(new File(file));
 		assertTrue(
 				"LDIF must start with Base64 encoded DN.",
@@ -180,7 +181,8 @@
 		eBot.button("Finish").click();
 
 		// verify that exported DSML contains the Base64 encoded DN
-		String content = FileUtils.readFileToString(new File(file));
+		eBot.sleep(2000);
+		String content = FileUtils.readFileToString(new File(file), "UTF-8");
 		assertTrue("DSML must contain DN with umlaut.", content
 				.contains("dn=\"cn=Wolfgang K\u00f6lbel,ou=users,ou=system\""));
 
@@ -254,7 +256,6 @@
                     SWTBotUtils.selectEntry( eBot, browserTree, false, "DIT", "Root DSE"
);
                     final SWTBotTree entryEditorTree = SWTBotUtils.getEntryEditorTree( eBot
);
                     String text = entryEditorTree.cell( 2, 1 );
-                    System.out.println( text );
                     return "dc=example,dc=com".equals( text );
                 }
 



Mime
View raw message