Closed LionChen-WORK closed 4 years ago
Hi @LionChen-WORK ,
Thanks for opening the issue. Do you need ":�:" to be replaced with an emoji or only "�" ?
Do you need ":�:" to be replaced with an emoji or only "�" ?
Sorry for not being clear. I am trying to get ":�:" be replaced.
Here is an example:
class ViewController: UIViewController {
private let emojis: [String: EmojiSource] = [
"c": .character("😄"),
"\u{F0000}": .character("❤️"),
]
@IBOutlet weak var textView: UITextView!
override func viewDidLoad() {
super.viewDidLoad()
textView.text = """
Unpresentable character: :\u{F0000}:
Control group: :c:
"""
textView.configureEmojis(emojis)
}
}
And this is the result:
@LionChen-WORK have you tried pasting the character directly in the source code?
private let emojis: [String: EmojiSource] = [
"c": .character("😄"),
"�": .character("❤️"),
]
@LionChen-WORK I just pushed version 0.1.8 which should fix your issue. I tweaked the RegEx to find unicode characters inside the shortcode. Thanks a lot for opening this issue!
have you tried pasting the character directly in the source code?
Have not tried this. But I was hoping that I could show different images for different unicodes.
I just pushed version 0.1.8 which should fix your issue. I tweaked the RegEx to find unicode characters inside the shortcode. Thanks a lot for opening this issue!
Great work! 😀
This does not work:
This is probably a rare use case, but I am trying to use Streamoji to replace some '�' that might occur in an app.