Skip to content

Commit

Permalink
URL using non ASCII characters [utf-8 support] dfabulich#5
Browse files Browse the repository at this point in the history
  • Loading branch information
denis authored and denis committed Mar 18, 2015
1 parent c2d956c commit 895cac1
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

import java.io.File;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.net.MalformedURLException;
import java.net.URL;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.List;
import java.util.zip.GZIPOutputStream;
Expand Down Expand Up @@ -193,9 +193,9 @@ private void writeSiteMap() {
if (gzip) {
FileOutputStream fileStream = new FileOutputStream(outFile);
GZIPOutputStream gzipStream = new GZIPOutputStream(fileStream);
out = new OutputStreamWriter(gzipStream);
out = new OutputStreamWriter(gzipStream, Charset.forName("UTF-8").newEncoder());
} else {
out = new FileWriter(outFile);
out = new OutputStreamWriter(new FileOutputStream(outFile), Charset.forName("UTF-8").newEncoder());
}

writeSiteMap(out);
Expand Down

0 comments on commit 895cac1

Please sign in to comment.