migzai / irc-api

A Java IRC API
Apache License 2.0
30 stars 11 forks source link

Possibility to specify an encoding #30

Open skuzzle opened 9 years ago

skuzzle commented 9 years ago

Hi,

I was trying to use this IRC lib because it seems to be the only one which is accessible through maven central and also seemed to be well designed. Now I stumbled on a problem: The default SocketChannelConnection always uses the system's default encoding. As far as I have researched the framework offers no easy way of exchanging the connection implementation without completely reimplementing the IRCApi interface.

migzai commented 9 years ago

You can change the default encoding anytime at run-time. Use System.setProperty("file.encoding", "your_desired_charset");

skuzzle commented 9 years ago

That's true, but maybe changing the default encoding is too invasive for the remaining parts of my application (besides that, it's bad practice relying on the default encoding because this makes the application highly platform dependent, and, in this case, IRC server dependent)

anormal81 commented 7 years ago

System.setProperty("file.encoding", "your_desired_charset"); ist not a solution for us. Some of our servers in european region operate with an iso8859-1 code page which is required. Sending messages with umlauts to an UTF-8 IRC server results in characters that can not be displayed. Each IRC client I've seen so far allows the specification of the encoding. Please add this as setting in IServerParamters.

migzai commented 5 years ago

Alright will work on that.