From: Stas'M Date: Sun, 27 Jan 2019 15:11:02 +0000 (+0300) Subject: Main: Fixup encoding inconsistences X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=24d173d1ebd972a69c80d3e4e6dfea86c9a144e1;p=d2df-editor.git Main: Fixup encoding inconsistences --- diff --git a/src/editor/f_packmap.pas b/src/editor/f_packmap.pas index 00e3dc0..e2551ba 100644 --- a/src/editor/f_packmap.pas +++ b/src/editor/f_packmap.pas @@ -107,7 +107,6 @@ end; procedure TPackMapForm.bPackClick(Sender: TObject); var - WadFile: String; mr: TMapReader_1; mw: TMapWriter_1; data: Pointer; diff --git a/src/editor/f_savemap.pas b/src/editor/f_savemap.pas index 14336d9..6d9b947 100644 --- a/src/editor/f_savemap.pas +++ b/src/editor/f_savemap.pas @@ -100,7 +100,7 @@ begin begin for i := 0 to list.Count - 1 do begin - g_ReadResource(FileName, list.Files[i].path, list.Files[i].name, data, len); + g_ReadResource(FileName, win2utf(list.Files[i].path), win2utf(list.Files[i].name), data, len); if len >= 3 then begin diff --git a/src/editor/f_selectmap.pas b/src/editor/f_selectmap.pas index 2d4882d..7474330 100644 --- a/src/editor/f_selectmap.pas +++ b/src/editor/f_selectmap.pas @@ -67,7 +67,7 @@ begin for i := 0 to list.Count - 1 do begin - g_ReadResource(FileName, list.Files[i].path, list.Files[i].name, data, len); + g_ReadResource(FileName, win2utf(list.Files[i].path), win2utf(list.Files[i].name), data, len); if len >= 3 then begin diff --git a/src/editor/g_resources.pas b/src/editor/g_resources.pas index 0e383c3..cc8e0a8 100644 --- a/src/editor/g_resources.pas +++ b/src/editor/g_resources.pas @@ -121,7 +121,6 @@ implementation var f: TWADEditor_1; begin res := 1; (* error *) - wad := utf2win(wad); section := utf2win(NoTrailing(section)); name := utf2win(name); ASSERT(name <> ''); @@ -176,7 +175,7 @@ implementation path := NoTrailing(list.Files[i].path); if (path <> section) or (list.Files[i].name <> name) then begin - g_ReadResource(wad, path, list.Files[i].name, data0, len0); + g_ReadResource(wad, win2utf(path), win2utf(list.Files[i].name), data0, len0); ASSERT(data0 <> nil); if path = '' then path := list.Files[i].name @@ -274,7 +273,7 @@ implementation path := NoTrailing(list.Files[i].path); if (path <> section) or (list.Files[i].name <> name) then begin - g_ReadResource(wad, path, list.Files[i].name, data0, len0); + g_ReadResource(wad, win2utf(path), win2utf(list.Files[i].name), data0, len0); ASSERT(data0 <> nil); if path = '' then path := list.Files[i].name