1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-06 01:06:01 +02:00

Fix to [Bug 192397] DBCS3.3: unable to save customized preferences of make file project from Masayuki Fuse <fuse@jp.ibm.com> with some modifications

This commit is contained in:
Mikhail Sennikovsky 2007-06-14 13:20:11 +00:00
parent 75e338c2f8
commit 1d64d99f2c

View file

@ -20,6 +20,7 @@ import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.net.URI;
import java.util.ArrayList;
import java.util.Arrays;
@ -1343,7 +1344,13 @@ public class CProjectDescriptionManager implements ICProjectDescriptionManager {
file.createNewFile();
}
fileStream = new FileOutputStream(file);
fileStream.write(utfString.getBytes());
byte[] bytes;
try {
bytes = utfString.getBytes("UTF-8"); //$NON-NLS-1$
} catch (UnsupportedEncodingException e){
bytes = utfString.getBytes();
}
fileStream.write(bytes);
fileStream.close();
// Close the streams
stream.close();