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:
parent
75e338c2f8
commit
1d64d99f2c
1 changed files with 8 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue