GithubHelp home page GithubHelp logo

furikake / sublime-codec Goto Github PK

View Code? Open in Web Editor NEW
24.0 24.0 7.0 114 KB

Codecs Plugin for Sublime Text. Supports Secure Hash / Message Digest such as MD5, SHA-1, SHA-256, SHA-512, encoding / decoding of Base64, Base62, Base32, Base16, URL encoding, Quoted-Printable, JSON, XML, Punycode, IDNA, CSP, etc

License: Other

Python 99.99% Shell 0.01%

sublime-codec's People

Contributors

furikake avatar iffy avatar nagromc avatar soulgain avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

sublime-codec's Issues

Some Base64 encoded content without padding fails to be decoded

Hello,

Some Base64 content without padding like eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ is not able to decode. Such data can be decoded: eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ==.

In the console I'm getting those messages:

Codec: fix base32 padding? False
Codec: fix base64 padding? False
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1488, in run_
    return self.run(edit, **args)
  File "/Users/abc/Library/Application Support/Sublime Text 3/Installed Packages/Codec.sublime-package/sublime_codec.py", line 78, in run
  File "/Users/abc/Library/Application Support/Sublime Text 3/Installed Packages/Codec.sublime-package/codec_base64.py", line 10, in b64decode
  File "./python3.3/base64.py", line 91, in b64decode
binascii.Error: Incorrect padding

[Feature request] IDNA2008 standard for punycode

1. Request

It would be nice, if you add IDNA2008 standard support for punycode like https://www.punycoder.com/.

2. Justification

For example, I have a link:

http://www.россия.рф/

If I convert link in https://www.punycoder.com/, I get result:

http://www.xn--h1alffa9f.xn--p1ai/

This link successful open in browsers.

If I convert link use your package, I get result:

http://www../-e5k3f5adpa7dun

If I insert this link in URL bar → I press Enter → link don't open for me → Firefox and Chrome hangs.

3. Desirable behavior

I select http://www.россия.рф/Ctrl+Shift+PCodec: Punycode encode → link convert to http://www.xn--h1alffa9f.xn--p1ai/.

Thanks.

RIPEMD

ripemd128, ripemd160, ripemd256, ripemd320

Unicode code points

This should output both \uHHHH, \UHHHHHH and U+HHHH styles.

Example encode 日本語 to

  • \u65e5\u672c\u8a9e
  • U+65e5U+672cU+8a9e

Unicode code points (web style)

This should output both hexadecimal and decimal style.

Example encode 日本語 to

  • 日本語
  • 日本語

Not working ST3 3126

Traceback (most recent call last):
  File "/opt/sublime_text/sublime_plugin.py", line 109, in reload_plugin
    m = importlib.import_module(modulename)
  File "./python3.3/importlib/__init__.py", line 90, in import_module
  File "<frozen importlib._bootstrap>", line 1584, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "/opt/sublime_text/sublime_plugin.py", line 915, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "sublime_codec in /home/avasilev/.config/sublime-text-3/Installed Packages/Codec.sublime-package", line 11, in <module>
ImportError: cannot import name parse

platform: ubuntu 16.04 lts

PLEASE FIX IT!!! <3

C style code point (ascii) and unicode

A unicode character such as should naively be encoded to \xe2\x82\xac. This will likely be a one-way operation as decoding it again would be tricky.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.