Skip to content

relax UTF8 validation on generated clients #52

New issue

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

Open
tianshu-orcl opened this issue Mar 10, 2025 · 0 comments
Open

relax UTF8 validation on generated clients #52

tianshu-orcl opened this issue Mar 10, 2025 · 0 comments
Assignees

Comments

@tianshu-orcl
Copy link
Member

tianshu-orcl commented Mar 10, 2025

when source data contains invalid UTF8 character data, the client code will raise error due to Unicode decoding error such as

    UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa0 in position 50555: invalid start byte

relax UTF8 validation can be done on the client. Each programming language has different approach. For example in python WebSocket client lib,

    from websocket import WebSocketApp

    ws = WebSocketApp(url,
              on_message=on_message,
              on_error=on_error,
              on_close=on_close,
              skip_utf8_validation=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants