Git Product home page Git Product logo

Comments (9)

russellmiller3 avatar russellmiller3 commented on September 15, 2024

See here: [http://apps.timwhitlock.info/emoji/tables/unicode]

from community.

ekalvi avatar ekalvi commented on September 15, 2024

We support emoji in messages, however only via the unicode representation. Pasting emoji directly isn't supported and a known bug. In YAML:

name: greeting
states:
    greeting:
        component: meya.random_text
        properties:
            responses:
            - "Hey there! \U0001F604"
            - "Hi! \U0001F604"
            - "Howdy! \U0001F604"
        delay:
            relative: 1
    help:
        component: meya.text
        properties:
            text: How can I help you today?

screen shot 2016-07-13 at 6 20 36 pm

from community.

russellmiller3 avatar russellmiller3 commented on September 15, 2024

Ah, thanks Erik!

On Wed, Jul 13, 2016 at 3:21 PM, Erik Kalviainen [email protected]
wrote:

We support emoji in messages, however only via the unicode representation.
Pasting emoji directly isn't supported and a known bug. In YAML:

name: greetingstates:
greeting:
component: meya.random_text
properties:
responses:
- "Hey there! \U0001F604"
- "Hi! \U0001F604"
- "Howdy! \U0001F604"
delay:
relative: 1
help:
component: meya.text
properties:
text: How can I help you today?

[image: screen shot 2016-07-13 at 6 20 36 pm]
https://cloud.githubusercontent.com/assets/1478414/16821836/8a1b69da-4926-11e6-9722-ebd7c6c03e01.png


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#19 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AGkUcNsH75ePjxEFxUNLdoPVCjtcpIy1ks5qVWTbgaJpZM4JKj5v
.

from community.

russellmiller3 avatar russellmiller3 commented on September 15, 2024

it looks like this workaround is fine for text and buttons, but not for
buttons in components.
An extra backslash is being added.

[image: Inline image 1]

On Wed, Jul 13, 2016 at 3:21 PM, Erik Kalviainen [email protected]
wrote:

We support emoji in messages, however only via the unicode representation.
Pasting emoji directly isn't supported and a known bug. In YAML:

name: greetingstates:
greeting:
component: meya.random_text
properties:
responses:
- "Hey there! \U0001F604"
- "Hi! \U0001F604"
- "Howdy! \U0001F604"
delay:
relative: 1
help:
component: meya.text
properties:
text: How can I help you today?

[image: screen shot 2016-07-13 at 6 20 36 pm]
https://cloud.githubusercontent.com/assets/1478414/16821836/8a1b69da-4926-11e6-9722-ebd7c6c03e01.png


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#19 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AGkUcNsH75ePjxEFxUNLdoPVCjtcpIy1ks5qVWTbgaJpZM4JKj5v
.

from community.

ekalvi avatar ekalvi commented on September 15, 2024

In Python code, you can use the native emoji character or specify the string as unicode:

text = u"Hey there! 😀"
text = u"Hey there! \U0001F604"

from community.

russellmiller3 avatar russellmiller3 commented on September 15, 2024

Ok, I'm seeing odd behavior when I try that.

[image: Inline image 1]

On Wed, Jul 13, 2016 at 5:34 PM, Erik Kalviainen [email protected]
wrote:

In Python code, you can use the native emoji character specify the string
as unicode:

text = u"Hey there! \U0001F604"


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#19 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AGkUcAUvmj38w3O37rt6A0ROdg3Yy-ikks5qVYQsgaJpZM4JKj5v
.

from community.

ekalvi avatar ekalvi commented on September 15, 2024

This works for me. Do you have the utf-8 line at the top?

# -*- coding: utf-8 -*-
from meya import Component


class EmojiComponent(Component):
    def start(self):
        messages = [
            self.create_message(text=u"Hi there! 😀"),
            self.create_message(text=u"Ho there! \U0001F604")
        ]
        return self.respond(messages=messages, action="next")

screen shot 2016-07-13 at 9 04 31 pm

from community.

russellmiller3 avatar russellmiller3 commented on September 15, 2024

I didn't have the utf line there, but I added it and I'm still seeing the
strange behavior.
component attached.

On Wed, Jul 13, 2016 at 6:04 PM, Erik Kalviainen [email protected]
wrote:

This works for me. Do you have the utf-8 line at the top?

-- coding: utf-8 --from meya import Component

class EmojiComponent(Component):
def start(self):
messages = [
self.create_message(text=u"Hi there! 😀"),
self.create_message(text=u"Ho there! \U0001F604")
]
return self.respond(messages=messages, action="next")

[image: screen shot 2016-07-13 at 9 04 31 pm]
https://cloud.githubusercontent.com/assets/1478414/16824880/6d15ded0-493d-11e6-8846-c92ef416ca45.png


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#19 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AGkUcB33daNargqR7QetJr1vwjx5hXSRks5qVYs1gaJpZM4JKj5v
.

from community.

ekalvi avatar ekalvi commented on September 15, 2024

This has been fixed with the Meya Studio release in October, 2016.

from community.

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.