Skip to content

Commit

Permalink
Merge branch 'master' into 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Ousret authored Sep 9, 2022
2 parents 18567aa + 6602dae commit 0a74e3d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/user/advanced_search.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ As follow ::

from charset_normalizer import from_bytes

my_byte_str = '我没有埋怨,磋砣的只是一些时间。'.encode('gb18030')
my_byte_str = 'Bсеки човек има право на образование.'.encode('cp1251')

results = from_bytes(
my_byte_str,
Expand Down
4 changes: 2 additions & 2 deletions docs/user/handling_result.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ When initiating search upon a buffer, bytes or file you can assign the return va

::

my_byte_str = '我没有埋怨,磋砣的只是一些时间。'.encode('gb18030')
my_byte_str = 'Bсеки човек има право на образование.'.encode('cp1251')

# Assign return value so we can fully exploit result
result = from_bytes(
my_byte_str
).best()

print(result.encoding) # gb18030
print(result.encoding) # cp1251

Using CharsetMatch
----------------------------
Expand Down
6 changes: 3 additions & 3 deletions docs/user/miscellaneous.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@ Any ``CharsetMatch`` object can be transformed to exploitable ``str`` variable.

::

my_byte_str = '我没有埋怨,磋砣的只是一些时间。'.encode('gb18030')
my_byte_str = 'Bсеки човек има право на образование.'.encode('cp1251')

# Assign return value so we can fully exploit result
result = from_bytes(
my_byte_str
).best()

# This should print '我没有埋怨,磋砣的只是一些时间。'
# This should print 'Bсеки човек има право на образование.'
print(str(result))


Logging
-------

Prior to the version 2.0.10 you may encounter some unexpected logs in your streams.
Prior to the version 2.0.11 you may encounter some unexpected logs in your streams.
Something along the line of:

::
Expand Down

0 comments on commit 0a74e3d

Please sign in to comment.