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

Parsing no longer works when exported as jar file #33

Closed
manuelgu opened this issue May 6, 2016 · 5 comments
Closed

Parsing no longer works when exported as jar file #33

manuelgu opened this issue May 6, 2016 · 5 comments

Comments

@manuelgu
Copy link

manuelgu commented May 6, 2016

Hello,

I'm using EmojiParser.parseToAliases(message) to convert emojis to to their aliases.

I'm reading messages from a third-party application which contain emojis.

I have two applications set up, one which I'm running from IntelliJ and one which is being exported as a .jar fille and executed via java -ver blah.jar

Whilst the pure Java application successfully parses the emoji to an alias, the exact same code exported as a .jar does not parse the emoji at all and still returns the emoji from EmojiParser.parseToAliases().

Happy to share some more code, thanks.

@manuelgu manuelgu changed the title No more parsing when in Minecraft server integration Parsing no longer works when exported as jar file May 8, 2016
@manuelgu
Copy link
Author

manuelgu commented May 8, 2016

Turns out this is an issue when the emoji-java is exported in a jar file in general. Updated main post.

@jppommet
Copy link

same issue here, we are using gradle shadow plugin 1.2.3

@jppommet
Copy link

@manuelgu Not sure if you tried this but in the file emojis.json you would notice that the emojis are unicode, let's replace the sunglasses emoji by its UTF-16 hex character "\uD83D\uDE0E" for example. Run your program in your IDE and as a jar, it should normally convert the emoji to its alias (short code).
Let me know if it worked for you.

@Lolologist
Copy link
Collaborator

A good idea; I'll give it a shot sometime soon.

-Daniel

On Thu, May 12, 2016, 10:53 PM Jean-Pierre Pommet notifications@github.com
wrote:

@manuelgu https://github.com/manuelgu Not sure if you tried this but in
the file emojis.json you would notice that the emojis are unicode, let's
replace the sunglasses emoji by its UTF-16 hex character "\uD83D\uDE0E" for
example. Run your program in your IDE and as a jar, it should normally
convert the emoji to its alias (short code).
Let me know if it worked for you.


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#33 (comment)

@manuelgu
Copy link
Author

My IntelliJ terminal has UTF-8 encoding (that is why it works) while the Windows Powershell uses Windows-1252. I couldn't figure a way to change that, but since my application is running on a linux terminal in bash it doesn't really matter, because that one has UTF-8 encoding as well.

Replacing the emojis in the file sounds like a great idea though!

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

3 participants