C++Builder Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
C++빌더 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
메신저 프로젝트
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
볼랜드포럼 광고 모집

C++빌더 Q&A
C++Builder Programming Q&A
[47310] 유니코드를 utf7으로 바꾸는 것 관련하야 잘 아시는 분좀 가르쳐 주세요..
jay [jt1911] 1071 읽음    2006-12-05 17:13
제가 유니코드를 utf7으로 바꾸는 라이브러리를 갖고 있는데요..
함수 관련된 사항은 아래와 같습니다.
근데 아무리 읽어 봐도 이해를 잘 못하겠어요.. (창피합니다)
아래의 설명을 보고 사용법을 아시는 분은 좀 설명해 주세요.
그리고 utf7이 결국 아스키 코드 맞는건가요? 이점도 가르쳐 주시면 감사하겠습니다.

결국 usc2를 넣으면 utf7 code가 나와야 하는데
start는 뭐고 end는 뭔지 그리고 첫번째 파라미터가 왜 더블포인터야 하는지 잘 이해가 안갑니다.
소스도 없이 이런 질문 올리는것 자체가 우스운 일이지만
이런 함수가 널리 쓰인다면 아시는 분이 있을거 같아서 질문 올립니다.

typedef unsigned short  UCS2;

/* ================================================================ */
/*      Each of these routines converts the text between *sourceStart and
sourceEnd, putting the result into the buffer between *targetStart and
targetEnd. Note: the end pointers are *after* the last item: e.g.
*(sourceEnd - 1) is the last item.

        The return result indicates whether the conversion was successful,
and if not, whether the problem was in the source or target buffers.

        After the conversion, *sourceStart and *targetStart are both
updated to point to the end of last text successfully converted in
the respective buffers.

        In ConvertUCS2toUTF7, optional indicates whether UTF-7 optional
characters should be directly encoded, and verbose controls whether the
shift-out character, "-", is always emitted at the end of a shifted
sequence.
*/

typedef enum {
        ok,                             /* conversion successful */
        sourceCorrupt,          /* source contains invalid UTF-7 */
        targetExhausted         /* insuff. room in target for conversion */
} ConversionResult;

ConversionResult        ConvertUCS2toUTF7 (
                UCS2** sourceStart, const UCS2* sourceEnd,
                char** targetStart, const char* targetEnd,
                int optional, int verbose);

ConversionResult        ConvertUTF7toUCS2 (
                char** sourceStart, char* sourceEnd,
                UCS2** targetStart, const UCS2* targetEnd);

/* ================================================================ */

+ -

관련 글 리스트
47310 유니코드를 utf7으로 바꾸는 것 관련하야 잘 아시는 분좀 가르쳐 주세요.. jay 1071 2006/12/05
47313     Re:유니코드를 utf7으로 바꾸는 것 관련하야 잘 아시는 분좀 가르쳐 주세요.. 로리시아 1047 2006/12/05
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.