Ignore:
Timestamp:
2021-04-06T15:14:58+02:00 (3 years ago)
Author:
Martin Sjölund <martin@…>
Parents:
f33851b5
git-author:
Martin Sjölund <martin@…> (03/16/21 08:57:25)
git-committer:
Martin Sjölund <martin@…> (04/06/21 15:14:58)
Message:

Handle UTF8 BOM in the diff API

File:
1 edited

Legend:

Unmodified
Added
Removed
  • OMCompiler/Compiler/Script/CevalScriptBackend.mo

    rf7d1f96 r1c28ff5  
    655655             platform,usercflags,senddata,res,workdir,gcc,confcmd,touch_file,uname,filenameprefix,compileDir,libDir,exeDir,configDir,from,to,
    656656             gridStr, logXStr, logYStr, x1Str, x2Str, y1Str, y2Str, curveWidthStr, curveStyleStr, legendPosition, footer, autoScaleStr,scriptFile,logFile, simflags2, outputFile,
    657              systemPath, gccVersion, gd, strlinearizeTime, suffix,cname, modeldescriptionfilename, tmpDir, tmpFile;
     657             systemPath, gccVersion, gd, strlinearizeTime, suffix,cname, modeldescriptionfilename, tmpDir, tmpFile, bom;
    658658      list<DAE.Exp> simOptions;
    659659      list<Values.Value> vals;
     
    10981098        ExecStat.execStatReset();
    10991099
     1100        (s1, bom) := StringUtil.stripBOM(s1);
    11001101        (tokens1, errorTokens) := scanString(s1);
    11011102        reportErrors(errorTokens);
     
    11211122        end if;
    11221123
    1123         tokens2 := scanString(s2);
     1124        (s2, bom) := StringUtil.stripBOM(s2);
     1125        (tokens2, errorTokens) := scanString(s2);
    11241126        reportErrors(errorTokens);
    11251127        ExecStat.execStat("diffModelicaFileListings scan string 2");
     
    11861188            then fail();
    11871189        end matchcontinue;
    1188       then (cache,Values.STRING(str));
     1190      then (cache,Values.STRING(bom + str));
    11891191
    11901192    case (cache,_,"diffModelicaFileListings",_,_) then (cache,Values.STRING(""));
Note: See TracChangeset for help on using the changeset viewer.