Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Use UTF-8 with BOM to save new documents

  • Loading branch information...
commit ca4dee70e39d3add8b37d13cc7b0a7a52c711da9 1 parent feabd33
Infocatcher authored

Showing 1 changed file with 9 additions and 2 deletions. Show diff stats Hide diff stats

  1. +9 2 winMergeTabs.js
11 winMergeTabs.js
@@ -201,8 +201,15 @@ function getFile(lpFrame) {
201 201 AkelPad.Command(4105); // IDM_FILE_SAVE
202 202 else {
203 203 var tempFile = file = getTempFile(hWndEdit, origFile);
204   - var codePage = AkelPad.GetEditCodePage(hWndEdit);
205   - var hasBOM = AkelPad.GetEditBOM(hWndEdit);
  204 + if(origFile) {
  205 + var codePage = AkelPad.GetEditCodePage(hWndEdit);
  206 + var hasBOM = AkelPad.GetEditBOM(hWndEdit);
  207 + }
  208 + else {
  209 + // Will use UTF-8 with BOM to correctly save all (most?) new documents
  210 + var codePage = 65001;
  211 + var hasBOM = 1;
  212 + }
206 213 var text = AkelPad.GetTextRange(0, -1);
207 214
208 215 AkelPad.SendMessage(hMainWnd, 273 /*WM_COMMAND*/, 4101 /*IDM_FILE_NEW*/, 0);

0 comments on commit ca4dee7

Please sign in to comment.
Something went wrong with that request. Please try again.