Skip to content

Commit 7e2285b

Browse files
committed
Add a note about how to install optional charset converter dependencies
Fixes part of #252 and #237.
1 parent 1c0cc3f commit 7e2285b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ import config from './config.json';
3737
discordIRC(config);
3838
```
3939

40+
When installing the library, you may encounter an error relating to the installation of `iconv` or `node-icu-charset-detector`.
41+
These are optional dependencies which allow you to set the target encoding of messages sent to Discord, as detailed below in the README.
42+
Without these dependencies and the relevant setting, messages that aren't sent in UTF-8 may be corrupted when copied to Discord.
43+
4044
## Configuration
4145
First you need to create a Discord bot user, which you can do by following the instructions [here](https://github.com/reactiflux/discord-irc/wiki/Creating-a-discord-bot-&-getting-a-token).
4246

@@ -94,6 +98,12 @@ The `ircOptions` object is passed directly to irc-upd ([available options](https
9498

9599
To retrieve a discord channel ID, write `\#channel` on the relevant server – it should produce something of the form `<#1234567890>`, which you can then use in the `channelMapping` config.
96100

101+
### Encodings
102+
103+
If you encounter trouble with some characters being corrupted from some clients (particularly umlauted characters, such as `ä` or `ö`), try installing the optional dependencies `iconv` and `node-icu-charset-detector`, then adding `"encoding": "utf-8"` to your `ircOptions` object.
104+
105+
Further information can be found in [the installation section of irc-upd](https://github.com/Throne3d/node-irc#character-set-detection).
106+
97107
## Tests
98108
Run the tests with:
99109
```bash

0 commit comments

Comments
 (0)