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

How to send chinese characters? #1193

Closed
NMC-DAVE opened this issue Apr 26, 2018 · 4 comments
Closed

How to send chinese characters? #1193

NMC-DAVE opened this issue Apr 26, 2018 · 4 comments

Comments

@NMC-DAVE
Copy link

Hi,
I want to send chinese characters with errbot + slack. But the message is messy. For example:

# -*- coding: utf-8 -*-
from errbot import BotPlugin, botcmd, re_botcmd
class Example(BotPlugin):
    @botcmd  # flags a command
    def tryme(self, msg, args):  # a command callable with !tryme
        return '您好!'  # This string format is markdown.

And in slack, the message turn to:

!tryme
鎮ㄥソ!

So, how can I fix this? Thanks very much!

Dave

@gbin
Copy link
Member

gbin commented Apr 26, 2018 via email

@NMC-DAVE
Copy link
Author

NMC-DAVE commented Apr 26, 2018

With the text backend, I got the same thing:

[31m[@kan ➡ @errbot] [36m>>> [0m!tryme
鎮ㄥソ!

In addition, when I run errbot, the warning message was shown:

Starting errbot with a default system encoding other than 'utf-8' might cause you a heap of troubles. Your current encoding is set at 'cp936'

@gbin
Copy link
Member

gbin commented Apr 27, 2018 via email

@sijis
Copy link
Contributor

sijis commented Jun 19, 2019

I'm not able to reproduce this issue in the latest release.

    @botcmd  # flags a command
    def issue1193(self, msg, args):  # a command callable with !tryme
        return '您好!'  # This string format is markdown.

Result

[@sijis ➡ @errbot] >>> !issue1193
您好!

If this persist, please reopen the issue.

@sijis sijis closed this as completed Jun 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants