From 36051894d75b4b2c520b0b61efd777bcb75fd956 Mon Sep 17 00:00:00 2001 From: xianii Date: Thu, 4 Dec 2025 02:53:45 +0800 Subject: [PATCH] fix extra BOM write to file --- Lib/WebViewToo.ahk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Lib/WebViewToo.ahk b/Lib/WebViewToo.ahk index 8442f93..0895055 100644 --- a/Lib/WebViewToo.ahk +++ b/Lib/WebViewToo.ahk @@ -718,7 +718,6 @@ class WebViewCtrl extends Gui.Custom { ResourceSize := DllCall("SizeofResource", "Ptr", Module, "Ptr", Resource) ResourceData := DllCall("LoadResource", "Ptr", Module, "Ptr", Resource, "Ptr") ConvertedData := DllCall("LockResource", "Ptr", ResourceData, "Ptr") - TextData := StrGet(ConvertedData, ResourceSize, "UTF-8") if (!DirExist(DestinationDir "\" OutDir)) { DirCreate(DestinationDir "\" OutDir) @@ -735,7 +734,7 @@ class WebViewCtrl extends Gui.Custom { } if (!FileExist(DestinationDir "\" ResourceName)) { - TempFile := FileOpen(DestinationDir "\" ResourceName, "w") + TempFile := FileOpen(DestinationDir "\" ResourceName, "w", "CP0") TempFile.RawWrite(ConvertedData, ResourceSize) TempFile.Close() FileSetAttrib("+HR", DestinationDir "\" OutDir) @@ -1222,4 +1221,5 @@ class WebViewCtrl extends Gui.Custom { ServerCertificateErrorDetected(Handler) => this.wv.add_ServerCertificateErrorDetected(Handler) FaviconChanged(Handler) => this.wv.add_FaviconChanged(Handler) LaunchingExternalUriScheme(Handler) => this.wv.add_LaunchingExternalUriScheme(Handler) -} \ No newline at end of file + +}