socketry / console

MIT License
52 stars 13 forks source link

Encode serialized output to avoid encoding errors. #44

Closed ioquatix closed 1 year ago

ioquatix commented 1 year ago

Introduce Console::Output::Encoder which can wrap serialized output to avoid encoding errors.

JSON::GeneratorError: source sequence is illegal/malformed utf-8
/usr/local/lib/ruby/3.2.0/json/common.rb:312:in `generate': source sequence is illegal/malformed utf-8 (JSON::GeneratorError)
    from /usr/local/lib/ruby/3.2.0/json/common.rb:312:in `generate'
    from /usr/local/lib/ruby/3.2.0/json/common.rb:641:in `dump'
    from /srv/vendor/bundle/ruby/3.2.0/gems/console-1.18.0/lib/console/serialized/logger.rb:33:in `dump'

Types of Changes

Contribution