瀏覽代碼

Updated README

master
achmizs 4 年之前
父節點
當前提交
22d4497a7b
共有 1 個檔案被更改,包括 3 行新增5 行删除
  1. 3
    5
      README

+ 3
- 5
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.
[2] The ‘encoding’ property of IRCClientSession does have one effect: it controls the encoding used by replies to CTCP TIME requests.

Loading…
取消
儲存