Giter Site home page Giter Site logo

unicode decode issue about irc HOT 3 CLOSED

jaraco avatar jaraco commented on May 28, 2024
unicode decode issue

from irc.

Comments (3)

jaraco avatar jaraco commented on May 28, 2024

Hi. Sorry for the trouble.

Since version 3 of the library (see the changelog for details), the IRC library tries to provide a higher level interface, abstracting encoding and decoding of strings. By default, it assumes the server is using UTF-8 encoding.

If you want to restore the previous behavior, where the library just passes through the raw bytestream, there's a workaround indicated in the changelog. Let me know if that doesn't straighten things out for you or if you have additional questions.

As for the logging, I suspect that the logging level isn't set low enough to allow the messages to pass. Can you try:

irc.client.log.setLevel(logging.DEBUG)

in addition to what you've already specified?


Original comment by: Jason R. Coombs

from irc.

jaraco avatar jaraco commented on May 28, 2024

ahh ok.

Logging now works thankyou. I did lower the logging threshold (logging.DEBUG) but it seems to the filehander not the actual logger.
This is mainly to catch a really annoying disconnect AND won't reconnect issue on a particular IRCD.

as to the utf-8 issue, for now I have added a very dirty try/except trap around each bot instance BUT with some additional prints while I get to the bottom of some of the new bits in this irc.


Original comment by: jonRB

from irc.

jaraco avatar jaraco commented on May 28, 2024

Glad I could help.


Original comment by: Jason R. Coombs

from irc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.