Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/16/16 18:00:33 (8 years ago)
Author:
mkommend
Message:

#2071: Added replacement fallback for exporting undefined characters (e.g., Infinity symbol in ASCII).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/DataAnalysisInstanceProvider.cs

    r13584 r13901  
    102102      }
    103103      using (var fileStream = new FileStream(path, FileMode.Create)) {
    104         using (var writer = new StreamWriter(fileStream, Encoding.Default)) {
     104        Encoding encoding = Encoding.GetEncoding(Encoding.Default.CodePage,
     105          new EncoderReplacementFallback("*"),
     106          new DecoderReplacementFallback("*"));
     107        using (var writer = new StreamWriter(fileStream, encoding)) {
    105108          writer.Write(strBuilder);
    106109        }
Note: See TracChangeset for help on using the changeset viewer.