diff --git a/CHANGELOG.md b/CHANGELOG.md index 933a36a..3f864f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog Notable changes to the smbus2 project are recorded here. +## [0.2.3] - 2019-01-10 +### Fixed +- Incorrect `i2c_msg` created in Python 3.x if str input contains ascii chars >= 128. + ## [0.2.2] - 2019-01-03 ### Added - SMBus Quick command. @@ -33,6 +37,7 @@ Notable changes to the smbus2 project are recorded here. First published version. +[0.2.3]: https://github.com/kplindegaard/smbus2/compare/0.2.2...0.2.3 [0.2.2]: https://github.com/kplindegaard/smbus2/compare/0.2.1...0.2.2 [0.2.1]: https://github.com/kplindegaard/smbus2/compare/0.2.0...0.2.1 [0.2.0]: https://github.com/kplindegaard/smbus2/compare/0.1.5...0.2.0 diff --git a/smbus2/smbus2.py b/smbus2/smbus2.py index a4b3392..1a2209c 100644 --- a/smbus2/smbus2.py +++ b/smbus2/smbus2.py @@ -169,7 +169,7 @@ def write(address, buf): """ if sys.version_info.major >= 3: if type(buf) is str: - buf = bytes(buf, 'UTF-8') + buf = bytes(map(ord, buf)) else: buf = bytes(buf) else: