From 22d4497a7b9d1cd1b1f1b7c16623d82f12bcc65a Mon Sep 17 00:00:00 2001 From: achmizs <1874748+achmizs@users.noreply.github.com> Date: Sat, 4 Dec 2021 22:21:34 -0500 Subject: [PATCH] Updated README --- README | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/README b/README index b805f48..4972066 100644 --- a/README +++ b/README @@ -45,10 +45,8 @@ IRCClientChannelDelegate.h NOTE on strings: -IRCClient stores and passes all strings (messages, nicks, channel names, mode strings, channel topics, etc.) as NSData objects, which contain null-terminated C strings. Values passed to framework methods (such as the IRC commands) should also be in this format[1]. This means that IRCClient is encoding-agnostic[2]; it is up to you to pass it properly encoded C-string representations of your text strings, and it is also up to you to select an appropriate encoding for display or other handling of received strings, as necessary. The 'encoding' property of IRCClientSession and IRCClientChannel may be useful in this regard (i.e. for the convenience of associating a server's or channel's preferred encoding with the relevant server or channel object), although note that this property is almost entirely epiphenomenal[3]. +IRCClient stores and passes all strings (messages, nicks, channel names, mode strings, channel topics, etc.) as NSData objects. Values passed to framework methods (such as the IRC commands) should also be in this format[1]. This means that IRCClient is encoding-agnostic[1]; it is up to you to pass it properly encoded representations of your text strings, and it is also up to you to select an appropriate encoding for display or other handling of received strings, as necessary. The ‘encoding’ property of IRCClientSession and IRCClientChannel may be useful in this regard (i.e. for the convenience of associating a server’s or channel’s preferred encoding with the relevant server or channel object), although note that this property is almost entirely epiphenomenal[2]. -[1] Although note that if you pass unterminated strings instead, IRCClient will add the null termination for you - but there is a slight performance penalty for this, so be sure to null-terminate the contents of your NSData objects, for optimal performance. +[1] Of course, IRCClient does not support UTF-16 nor any other non-8-bit encoding, as the IRC protocol does not support such encodings either. -[2] Of course, IRCClient does not support UTF-16 nor any other non-8-bit encoding (since the byte representations of such encodings may contain nulls, and therefore cannot be used as C strings), but the IRC protocol does not support such encodings either. - -[3] The 'encoding' property of IRCClientSession does have one effect: it controls the encoding used by replies to CTCP TIME requests. \ No newline at end of file +[2] The ‘encoding’ property of IRCClientSession does have one effect: it controls the encoding used by replies to CTCP TIME requests.