Home Download Buy Blog Forum Support

Setting a default encoding, is this possible?

Setting a default encoding, is this possible?

Postby dlrourke on Sat Jun 13, 2009 11:30 am

I have some files that use the old DOS codepage 437 line drawing characters to draw diagrams and boxes around comments. These characters exist in the font DejaVu Sans Mono. If i load my files into Sublime using the "Open with encoding" menu item, DOS CP 437 can be selected and my files look great using DejaVu Sans Mono. Is there a setting to make DOS CP 437 the default encoding for any file read into Sublime with the Open menu item?

TIA for all your help.
dlrourke
 
Posts: 2
Joined: Sat Jun 13, 2009 11:20 am

Re: Setting a default encoding, is this possible?

Postby jps on Sat Jun 13, 2009 12:40 pm

There's currently no way to set the default encoding, but you can make it easier to open files using a particular encoding, for example, if you save this:

Code: Select all
<bindings>
   <binding key="ctrl+alt+o" command="openWithEncoding 'DOS (CP 437)'"/>
</bindings>


into Packages/User/Default.sublime-keymap, it'll bind ctrl+alt+o open a file using CP 437.

I'll put an item to the todo list to allow the fallback encoding to be changed from CP 1252.
jps
Site Admin
 
Posts: 3067
Joined: Wed Mar 19, 2008 12:33 pm

Re: Setting a default encoding, is this possible?

Postby dlrourke on Sat Jun 13, 2009 1:51 pm

Wow, that was quick! Thank you for the work-around and the impending addition.
dlrourke
 
Posts: 2
Joined: Sat Jun 13, 2009 11:20 am


Return to Technical Support

Who is online

Users browsing this forum: Google [Bot] and 17 guests