• Stars
    star
    178
  • Rank 208,193 (Top 5 %)
  • Language
    Python
  • License
    Other
  • Created over 12 years ago
  • Updated about 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Guess encoding of files, show in status bar, convert to UTF-8 from a variete of encodings..

Since ST3 build 3057, the encoding menu has been moved to the status bar. See www.sublimetext.com/3dev for settings to show encoding and line endings

Description

Encoding Helper is a Sublime Text plug-in which provides the following features:

  • attempts to guess encoding of files
  • show when the current document is maybe broken because was opened with an incorrect encoding (or just because there is an encoding mismatch)
  • convert to UTF-8 from a variete of encodings organized in a menu.
  • convert to UTF-8 quickly from guessed encoding via menuitem
  • convert to UTF-8 automatically when opening a file via some defined encodings found on User preferences

You should know that attempt to guess the encoding of a file is hard and the results for some encodings is not 100% accurate. Also, is a task that consume CPU, for this reason this plug-in includes a lot of optimizations.

Screenshot

UTF-8

This package aims to assist you to convert your documents to UTF8. Has no intention to support the usage of other encodings than UTF8. Has no intention to assist in maintenance of files with other encodings, you should convert these to UTF8 if possible.

Some more info

  • I'm not an expert on encodings, don't talk to me as an expert. I just like a lot to build software compatible with every language using UTF-8
  • python chardet library is a port of chardet by Mozilla http://www-archive.mozilla.org/projects/intl/chardet.html
  • python chardet library is a 'Gone' project http://feedparser.org/
  • By looking for the null character '\0' on files, means that every UTF16 file will be marked as binary ( same as in git source )
  • When converting a file to UTF-8 from some other encoding, the plugin calls to codecs.open with the selected encoding as argument. See http://docs.python.org/library/codecs.html
  • If you are going to report that some file is reported with an incorrect encoding, please upload the file as is to some reliable resource and provide detailed information. Please be informed that even doing this I'm unable to look into the low levels on why this is happening. This is just to collect data that maybe is informative to someone curious on this topic.
  • Just for fun, It would be nice if someone can create a dataset of pure txt files with every char found in a complete list of character sets. This: http://www.mauvecloud.net/charsets/manual/index.html but with the files in this format: http://vancouver-webpages.com/multilingual/russian-koi.html ( without html, without imgs, just text )

Resources

chardet library: http://pypi.python.org/pypi/chardet

dataset small: http://vancouver-webpages.com/multilingual/ http://charsetplus.tripod.com/HTMLs/index.html

dataset huge: http://www.mauvecloud.net/charsets/index.html

codecs: http://docs.python.org/library/codecs.html

ST linux and OSX codecs from https://github.com/seanliang/Codecs33

Source-code

https://github.com/titoBouzout/EncodingHelper

Installation

Download or clone the contents of this repository to a folder named exactly as the package name into the Packages/ folder of ST.

Forum Thread

http://www.sublimetext.com/forum/viewtopic.php?f=5&t=3453

License

See license.txt

More Repositories

1

SideBarEnhancements

Enhancements to Sublime Text sidebar. Files and folders.
Python
2,167
star
2

Dictionaries

Hunspell UTF8 dictionaries. These work with Sublime Text. [Spell check]
Python
1,435
star
3

Tag

Collection of packages about HTML/XML tags.
Python
430
star
4

BufferScroll

Remember, restore and sync scroll, bookmarks, marks, folds and cursors. keys: multiple columns one buffer, follow mode, split, screen, pages, synchronize vertical and typewriter scrolling
Python
311
star
5

WordCount

Real-time Word, Char, Line and Page counter, in the status-bar for the document, line or selection. Sublime Text
Python
289
star
6

SideBarGit

Add git commands to sidebar. Textual port of my komodin (komodo edit) extension for sublime text.
Python
244
star
7

Open-Include

Will open file paths found under the cursor with ALT+D
Python
132
star
8

SideBarFolders

For when a project system is too much.
Python
82
star
9

ServiceWorkerFullVideoBuffer

A service worker that buffers a full video, so when the video tag ask for ranges, these can be satisfied. Play + pause = buffer the whole video.
JavaScript
52
star
10

FindResultsApplyChanges

Edit just there in the "Find Results" buffer, merge changes back to the files.
Python
50
star
11

solid-windowed

Given a list of items, only render what's visible on the screen while allowing scrolling the whole list.
JavaScript
43
star
12

komodo-komodin-git

A komodo Git extension
JavaScript
16
star
13

Toolbar

The missing ST toolbar ( with emojis ใƒ„ )
JavaScript
14
star
14

Camaleon

Cycle chrome theme and colour schemes with F8
Python
10
star
15

PreventFakeClones

Prevents opening the same file twice, if does not share a buffer (ie is not a clone/duplicate or cloned view/tab/file).
Python
7
star
16

pota

pota is a small and pluggable Reactive Web Renderer for Reactive Libraries.
JavaScript
3
star
17

dom-syntax-sugar

A pluggable babel plugin for adding syntax sugar to JSX.
JavaScript
2
star
18

solid-media-linkify

Given a string it returns links, images, videos, audio as tags and also emojis like `๐Ÿฆ†` as ๐Ÿฆ†.
JavaScript
2
star
19

locationbar2-utf8

Locationbarยฒ with full support for UTF8 URLs
CSS
2
star
20

angelia.io

WebSockets Server and Client for node.js and the browser
JavaScript
2
star
21

Android

myAPI
Java
1
star
22

on-exit

Calls functions before node exits. A node exit handler.
JavaScript
1
star
23

write-effect

It tracks changes, and deep changes on an object. Runs a callback whenever something changes, an effect.
JavaScript
1
star
24

solid-tooltip

Directive for displaying tooltips on SolidJS components given a `title` attribute.
JavaScript
1
star
25

Format

Sublime Text Plug-in for formatting code or text on selections or files via any cli formatter you wish
Python
1
star
26

komodo-tab-undo-close

A menuitem on tab context menu to reopen the last closed tab (undo close tab).
Shell
1
star
27

dom-flair

Solve any or most html layout issues in intuitive ways via attributes without having to think much about CSS. For example <div col grow></div>. That's it.
CSS
1
star
28

komodo-nav

Experimental folder browsing and bookmarks: for Komodo.
JavaScript
1
star
29

komodo-garden

many remotes, on many trees, all asynch
JavaScript
1
star