코덱 등록소와 지원 함수
***********************

int PyCodec_Register(PyObject *search_function)
    * Part of the 안정 ABI.*

   새로운 코덱 검색 함수를 등록합니다.

   As a side effect, this tries to load the "encodings" package, if
   not yet done, to make sure that it is always first in the list of
   search functions.

int PyCodec_Unregister(PyObject *search_function)
    * Part of the 안정 ABI 버전 3.10 이후로.*

   Unregister a codec search function and clear the registry's cache.
   If the search function is not registered, do nothing. Return 0 on
   success. Raise an exception and return -1 on error.

   Added in version 3.10.

int PyCodec_KnownEncoding(const char *encoding)
    * Part of the 안정 ABI.*

   지정된 *encoding*에 대해 등록된 코덱이 있는지에 따라 "1" 이나 "0"을
   반환합니다. 이 함수는 항상 성공합니다.

PyObject *PyCodec_Encode(PyObject *object, const char *encoding, const char *errors)
    *반환값: 새 참조.** Part of the 안정 ABI.*

   일반 코덱 기반 인코딩 API.

   *object*는 *errors*로 정의된 에러 처리 방법을 사용하여 지정된
   *encoding*에 대해 발견된 인코더 함수로 전달됩니다. 코덱에 정의된 기
   본 방법을 사용하기 위해 *errors*가 "NULL" 일 수 있습니다. 인코더를
   찾을 수 없으면 "LookupError"를 발생시킵니다.

PyObject *PyCodec_Decode(PyObject *object, const char *encoding, const char *errors)
    *반환값: 새 참조.** Part of the 안정 ABI.*

   일반 코덱 기반 디코딩 API.

   *object* is passed through the decoder function found for the given
   *encoding* using the error handling method defined by *errors*.
   *errors* may be "NULL" to use the default method defined for the
   codec.  Raises a "LookupError" if no decoder can be found.


코덱 조회 API
=============

다음 함수에서, *encoding* 문자열은 모두 소문자로 변환되어 조회되므로,
이 메커니즘을 통한 인코딩 조회는 대소문자를 구분하지 않게 됩니다. 코덱
이 없으면, "KeyError"가 설정되고 "NULL"이 반환됩니다.

PyObject *PyCodec_Encoder(const char *encoding)
    *반환값: 새 참조.** Part of the 안정 ABI.*

   주어진 *encoding*에 대한 인코더 함수를 가져옵니다.

PyObject *PyCodec_Decoder(const char *encoding)
    *반환값: 새 참조.** Part of the 안정 ABI.*

   주어진 *encoding*에 대한 디코더 함수를 가져옵니다.

PyObject *PyCodec_IncrementalEncoder(const char *encoding, const char *errors)
    *반환값: 새 참조.** Part of the 안정 ABI.*

   지정된 *encoding*에 대한 "IncrementalEncoder" 객체를 가져옵니다.

PyObject *PyCodec_IncrementalDecoder(const char *encoding, const char *errors)
    *반환값: 새 참조.** Part of the 안정 ABI.*

   지정된 *encoding*에 대한 "IncrementalDecoder" 객체를 가져옵니다.

PyObject *PyCodec_StreamReader(const char *encoding, PyObject *stream, const char *errors)
    *반환값: 새 참조.** Part of the 안정 ABI.*

   지정된 *encoding*에 대한 "StreamReader" 팩토리 함수를 가져옵니다.

PyObject *PyCodec_StreamWriter(const char *encoding, PyObject *stream, const char *errors)
    *반환값: 새 참조.** Part of the 안정 ABI.*

   지정된 *encoding*에 대한 "StreamWriter" 팩토리 함수를 가져옵니다.


유니코드 인코딩 에러 처리기용 등록소 API
========================================

int PyCodec_RegisterError(const char *name, PyObject *error)
    * Part of the 안정 ABI.*

   지정된 *name* 으로 에러 처리 콜백 함수 *error*를 등록합니다. 코덱이
   인코딩할 수 없는 문자/디코딩할 수 없는 바이트열을 발견하고, 인코드/
   디코드 함수를 호출할 때 *name*이 error 매개 변수로 지정되었을 때 이
   콜백 함수를 호출합니다.

   콜백은 하나의 인자로 "UnicodeEncodeError", "UnicodeDecodeError" 또
   는 "UnicodeTranslateError"의 인스턴스를 받아들이는데, 문제가 되는
   문자나 바이트의 시퀀스와 이들의 원본 문자열에서의 오프셋에 대한 정
   보를 담고 있습니다 (이 정보를 추출하는 함수는 유니코드 예외 객체를
   참조하세요). 콜백은 주어진 예외를 발생시키거나, 문제가 있는 시퀀스
   의 대체와 원래 문자열에서 인코딩/디코딩을 다시 시작해야 하는 오프셋
   을 제공하는 정수를 포함하는 두 항목 튜플을 반환해야 합니다.

   성공하면 "0"을, 에러면 "-1"을 반환합니다.

PyObject *PyCodec_LookupError(const char *name)
    *반환값: 새 참조.** Part of the 안정 ABI.*

   *name* 으로 등록된 에러 처리 콜백 함수를 찾습니다. 특수한 경우로
   "NULL"이 전달 될 수 있는데, 이때는 "strict" 에 대한 에러 처리 콜백
   이 반환됩니다.

PyObject *PyCodec_StrictErrors(PyObject *exc)
    *반환값: 항상 NULL.** Part of the 안정 ABI.*

   *exc*를 예외로 발생시킵니다.

PyObject *PyCodec_IgnoreErrors(PyObject *exc)
    *반환값: 새 참조.** Part of the 안정 ABI.*

   잘못된 입력을 건너뛰고, 유니코드 에러를 무시합니다.

PyObject *PyCodec_ReplaceErrors(PyObject *exc)
    *반환값: 새 참조.** Part of the 안정 ABI.*

   유니코드 인코딩 에러를 "?" 나 "U+FFFD"로 치환합니다.

PyObject *PyCodec_XMLCharRefReplaceErrors(PyObject *exc)
    *반환값: 새 참조.** Part of the 안정 ABI.*

   유니코드 인코딩 에러를 XML 문자 참조로 치환합니다.

PyObject *PyCodec_BackslashReplaceErrors(PyObject *exc)
    *반환값: 새 참조.** Part of the 안정 ABI.*

   유니코드 인코딩 에러를 백 슬래시 이스케이프("\x", "\u" 및 "\U")로
   치환합니다.

PyObject *PyCodec_NameReplaceErrors(PyObject *exc)
    *반환값: 새 참조.** Part of the 안정 ABI 버전 3.7 이후로.*

   유니코드 인코딩 에러를 "\N{...}" 이스케이프로 치환합니다.

   Added in version 3.5.
