Skip to content
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

SQLite encoding issue #887

Closed
wilddylan opened this issue Jul 29, 2017 · 2 comments
Closed

SQLite encoding issue #887

wilddylan opened this issue Jul 29, 2017 · 2 comments

Comments

@wilddylan
Copy link
Collaborator

When use SQLitestorage, Chinese looks like have some encoding problems.

sqlite> select * from StatementTable;
11|大���浪���你�������|��
12|�海�|��
13|������河���你����干��|��

What's wrong with it...

When I use this bot in server:

class ChatbotHandler(RequestHandler):
    def get(self, question):
        result = '小益费尽了九牛二虎之力未能找到相关内容'
        try:
            if question:
                bot_result = chatbot.get_response(str(question))
                if bot_result:
                    result = str(bot_result)
        except e:
            print(e)
        self.write(json.dumps({'data': result}, ensure_ascii=False))
        self.finish()

response with a fail encoding was:

{"data": "�海�"}
@wilddylan
Copy link
Collaborator Author

Fixed by #890

@lock
Copy link

lock bot commented Mar 10, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant