We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The mllp server encoding is hard-coded to 'utf-8'. This can result in errors if decoding of stream fails due to other encoding.
Solution: change __init__ of MLLPServer:
__init__
def __init__(self, host, port, handlers, timeout=10, char_encoding='utf-8'): self.host = host self.port = port self.handlers = handlers self.timeout = timeout self.char_encoding = char_encoding TCPServer.__init__(self, (host, port), _MLLPRequestHandler)
remove hardcoded encoding in _MLLPRequestHandler and add to setup:
setup
self.encoding = self.server.char_encoding
The text was updated successfully, but these errors were encountered:
I don't think this is an issue any more. The encoding can be customized like so:
from hl7apy.mllp import MLLPRequestHandler, MLLPServer class CustomMLLPRequestHandler(MLLPRequestHandler): encoding = "latin1" MLLPServer(..., request_handler_class=CustomMLLPRequestHandler)
Sorry, something went wrong.
No branches or pull requests
The mllp server encoding is hard-coded to 'utf-8'. This can result in errors if decoding of stream fails due to other encoding.
Solution:
change
__init__
of MLLPServer:remove hardcoded encoding in _MLLPRequestHandler and add to
setup
:The text was updated successfully, but these errors were encountered: