Open simnalamburt opened 8 years ago
Thanks for this report. I'll take a look at this today and see what I can do.
Maybe it's deprecated now but i used to Send/write nick as binary to the server ('NICK '+nick+'\r\n', 'binary');
I'm not particularly well-acquainted with this project, but I'm not actually sure what spec we should be going by that permits Unicode nicknames? I haven't seen a specific one mentioned, looking around the project briefly, but RFC2812 doesn't allow them (as said in the start of this issue):
message = [ ":" prefix SPACE ] command [ params ] crlf
prefix = servername / ( nickname [ [ "!" user ] "@" host ] )
nickname = ( letter / special ) *8( letter / digit / special / "-" )
letter = %x41-5A / %x61-7A ; A-Z / a-z
digit = %x30-39 ; 0-9
special = %x5B-60 / %x7B-7D
; "[", "]", "\", "`", "_", "^", "{", "|", "}"
At present it looks like the code matches this spec (mostly) – it looks in the prefix for the Regex pattern:
/^([_a-zA-Z0-9\~\[\]\\`^{}|-]*)(!([^@]+)@(.*))?$/
(the 1st, 3rd and 4th matches are made into the nick
, user
and host
params, or if nothing is matched, it makes the whole prefix into the message's server
)
I also found this spec which is apparently in the process of being written and seems to be part of 'IRCv3', but it doesn't yet specify what can go into a nickname.
Any ideas?
Edit: Or we could just hope to merge one of the already existing PRs, I guess.
sorry I can not speak english well.
I had this problem with teleirc.
match = message.prefix.match(/^([_a-zA-Z0-9\~\[\]\\`^{}|-]*)(!([^@]+)@(.*))?$/);
this line edit to
match = message.prefix.match(/^([_a-zA-Z0-9\~\[\]\\`^{}|-|\u0100-\ud800]*)(!([^@]+)@(.*))?$/);
and work well with korean
TL;DR
Hey it's 2016 and it's time to use unicode.
Most IRC clients allows unicode nickname; irssi, weechat, MozIRC, IRCCloud, shoutIRC, ZNC, etc. And most CJK IRC servers allows unicode nickname; http://ozinger.org/, http://www.hanirc.org/, http://www.luatic.net/, https://twitter.com/HanIRC, etc. I know that current IRC spec does not allow non-ASCII nickname but that spec has not been changed for 16 years and CJK and non American users cannot use IRC without unicode nickname support.
There were so many requests that ask node-irc to allow non-ASCII nickname. There're so many forks which enable non-ASCII nickname. And non of them were taken seriously.
It's 2016 and it's a shame to know that node-irc does not support non-ASCII nickname while everyone else does. Supporting unicode nickname is not just technical but also an ethnic issue.
If you're interested in strictly following RFC2812, please at least enable this feature optionally.
Note Personally I had no option but to use slate-irc so I changed my all codes to use slate-irc instead of node-irc.