I'm missing one useful feature which others text editors often offer. In bottom status bar they show ASCII and UTF code of current character - character before or after current position (not sure now). I cannot find package doing that or native feature that does that.
Thank you for your help.
I ran into several issues with the code posted by Sergey Telshevsky in ST2 / Python 2.7:
I got a
SyntaxError: Non-ASCII character '\xe2' in file ./display_character_code.py on line 7
because of the# some test chars = $ €
- removing this commented out code, or declaring a character encoding at the top of the Python code, e.g.# -*- coding: UTF-8 -*-
gets rid of the error. I also gotUnicodeEncodeError: 'ascii' codec can't encode character u'\u20ac'
when selecting the sample "€" (because it is not an ASCII character). And even after fixing these, the Unicode key was never displayed; e.g. the status bar showedASCII: 123 UTF:
. So I reworked his example and came up with the following:Example output:
Here is one such plugin, it displays the character code in decimal: Show Character Code
Although it shows only the decimal value for the character code
I made a plugin for this :)
Create a
anyname.py
file in yourPackages/User/
directory.This should show you the ASCII and Unicode code in the status bar of the character to the right of the caret.
Tell me if this works for you, tested with ST3 on Kubuntu Linux 12.04 x64. Probably won't work on ST2 because of the different Python versions.