IBM935
The codec ibm935 is not yet officially supported. This package is designed for conversion between unicode and ibm935.
Installation
Using pip:
$ pip install ibm935
Or manually download the archive and run the command after extracting the stuff inside:
$ python setup.py install
Usage
Before using this codec, import the module:
import ibm935
Then we can convert unicode strings into ibm935 codec as usual:
# Python 2
encoded_bytes = u"我爱Python这么美好的语言!".encode("ibm935")
decoded_string = encoded_bytes.decode("ibm935")
# Python 3 - the prefix `u` can be omitted
encoded_bytes = "我爱Python这么美好的语言!".encode("ibm935")
decoded_string = encoded_bytes.decode("ibm935")
We can also write files using this codec:
with open("ibm935.txt", "w", encoding="ibm935") as f:
f.write("我爱Python!")
Note:
- This package is not yet fully tested.
- There is a tough situation where writing a file with separate
words(double-byte) causes redundant bytes like\x0f\x0e.
Release files for ibm935 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ibm935-0.2.1.tar.gz | 40.1 kB | Details |
Release files / ibm935-0.2.1.tar.gz
| Download URL | ibm935-0.2.1.tar.gz |
|---|---|
| Size | 40.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2f24b21a28a5f783d7df18eb34b79d2362bbe58cec7a0fa985b2e4e7ab43ad5c
|
|
BLAKE2b-256 checksum How to use checksums |
057c427cadd1827d996f998e3d58db1387abd0a4142a4a5ebc47e8614b8e8369
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
|