mrkaye97 / slackr

An R package for sending messages from R to Slack
https://matthewrkaye.com/slackr/
Other
307 stars 83 forks source link

Problems with Umlauts #154

Closed nicoschreibt closed 3 years ago

nicoschreibt commented 3 years ago

Somebody on Stackoverflow asked me to post this here, so:

I'm working with slackr to send automated text to a slack channel. That works perfectly on Linux. However, if I send the same message from my Windows PC there's a problem with umlauts.

slackr_bot("äääää") No encoding supplied: defaulting to UTF-8. In slack:

<e4><e4><e4><e4><e4>

mrkaye97 commented 3 years ago

Thanks for opening this issue! It was me who asked about it.

I'll look into this and see if it's a bug in slackr or not -- it probably is. Might be Windows-specific though. If it is, it'll be tough to me to replicate on MacOS / Linux.

I'll poke around and see if I can fix this

mrkaye97 commented 3 years ago

Okay, so before I go digging around in slackr, do you mind trying this @nicoschreibt:

Sys.setlocale(category = "LC_ALL", locale = "German")

and then trying slackr_bot again? That might fix the issue

nicoschreibt commented 3 years ago

ok, tried that. still the same issue. > slackr::slackr_bot("ääääää") No encoding supplied: defaulting to UTF-8.

Slack: <e4><e4><e4><e4><e4><e4>

mrkaye97 commented 3 years ago

Gotcha, thanks. I'll look into this and see if I can find a fix

mrkaye97 commented 3 years ago

@nicoschreibt This is hopefully fixed in slackr 2.4.0. Do you mind installing the new version with devtools::install_github("mrkaye97/slackr") to see if it fixes your issue. You'll still probably need to set Sys.setlocale(category = "LC_ALL", locale = "German")

Sorry for taking so long to get around to this, and let me know if the new version helps!