Why does Mercurial think my SQL files are binary?

I’ve run into this problem because SQL Server Management Studio saves the files as Unicode. The first two bytes (most of the time) of a Unicode text file define the encoding. Most newer text editors (e.g. Notepad) handle this transparently.

The first two bytes are probably where your problem is. They may look like ÿþ. Or FF FE in hex.

On the “Save” button on the Save dialog is a pick list. Choose “Save with Encoding…” and select “US-ASCII-Codepage20127”. I believe this setting is sticky and will remain for future saves.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)