@@ -62,7 +62,7 @@ LoadCellFromFile[path_, notebook_] := Module[{stream, result, legacyQ},
6262
6363 Echo ["Loading cells from file" ];
6464
65- stream = OpenRead [path , BinaryFormat -> True ];
65+ stream = OpenRead [path , DOSTextFormat -> False ];
6666 result = readNotebook [stream , 10 ];
6767 Close [stream ];
6868
@@ -73,7 +73,7 @@ LoadCellFromFile[path_, notebook_] := Module[{stream, result, legacyQ},
7373 ,
7474 Echo ["Loading failed. Retrying with a legacy .wln parser..." ];
7575
76- stream = OpenRead [path , BinaryFormat -> True ];
76+ stream = OpenRead [path , DOSTextFormat -> False ];
7777 legacyQ = StringMatchQ [ReadLine [stream , TimeConstraint -> 10 ], ___ ~~ "<|" ~~ __ ];
7878 Close [stream ];
7979
@@ -98,7 +98,7 @@ LoadFromFile[path_String | File[path_], opts: OptionsPattern[] ] := Module[{stre
9898
9999 Echo ["Loading from file" ];
100100
101- stream = OpenRead [path , BinaryFormat -> True ];
101+ stream = OpenRead [path , DOSTextFormat -> False ];
102102 notebook = DeserializeFromStream [stream , opts ];
103103 Close [stream ];
104104
@@ -108,7 +108,7 @@ LoadFromFile[path_String | File[path_], opts: OptionsPattern[] ] := Module[{stre
108108 ,
109109 Echo ["Loading failed. Retrying with a legacy .wln parser..." ];
110110
111- stream = OpenRead [path , BinaryFormat -> True ];
111+ stream = OpenRead [path , DOSTextFormat -> False ];
112112 legacyQ = StringMatchQ [ReadLine [stream , TimeConstraint -> 10 ], ___ ~~ "<|" ~~ __ ];
113113 Close [stream ];
114114
@@ -153,7 +153,7 @@ LoadFromString[string_String, opts: OptionsPattern[] ] := Module[{stream, notebo
153153
154154 (* legacy format. Keep it for backward compatibillity! *)
155155 (* it does not take that much space! *)
156- With [{n = Deserialize [ ImportString [string , "WL" ], NotebookObj [opts ] ]},
156+ With [{n = Deserialize [ ImportString [string , "WL" , DOSTextFormat -> False ], NotebookObj [opts ] ]},
157157 If [! MatchQ [n , _ NotebookObj ], Return [$Failed ]; ];
158158 notebook = n ;
159159 ];
0 commit comments