mitmproxy 学习笔记

删除掉通过 pip -e 安装的 mitmproxy

  • cd /usr/local/lib/python3.5/dist-packages

  • rm mitmproxy.egg-link

  • sudo vi easy-install.pth



  • rm mitmproxy mitmweb mitmdump

为什么 asynchronous 更好一些?

str.length 和 code unit


关于 UTF-16


  • Comparison of Unicode encodings - Wikipedia

    UTF-16 and UTF-32 do not have endianness defined, so a byte order must be selected when receiving them over a byte-oriented network or reading them from a byte-oriented file. This may be achieved by using a byte-order mark at the start of the text or assuming big-endian (RFC 2781). UTF-8, UTF-16BE, UTF-32BE, UTF-16LE and UTF-32LE are standardised on a single byte order and does not have this problem.

  • JavaScript’s internal character encoding: UCS-2 or UTF-16?

    UTF-16 (16-bit Unicode Transformation Format) is an extension of UCS-2 that allows representing code points outside the BMP. It produces a variable-length result of either one or two 16-bit code units per code point. This way, it can encode code points in the range from 0 to 0x10FFFF.

    JavaScript engines are free to use UCS-2 or UTF-16 internally. Most engines that I know of use UTF-16