PHP mod_korean extension Reference
  • Introduction
  • Installation
  • APIs
    • Check Functions
      • check_filename_lib
      • check_htmltbale_lib
      • check_uristr_lib
      • get_microtime_lib
      • human_fsize_lib
      • is_email_lib
      • is_hangul_lib
      • is_iis_lib
      • is_url_lib
      • is_windows_lib
      • buildno_lib
      • version_lib
    • Filesystem Functions
      • filelist_lib
      • getfile_lib
      • getfiletype_lib
      • putfile_lib
      • readfile_lib
      • pcregrep_lib
    • HTML Functions
      • agentinfo_lib
      • autolink_lib
      • get_hostname_lib
      • movepage_lib
      • perror_lib
      • pnotice_lib
    • Charset Functions
      • ncrencode_lib
      • ncrdecode_lib
      • uniencode_lib
      • unidecode_lib
      • utf8encode_lib
      • utf8decode_lib
      • substr_lib
      • postposition_lib
    • Image Functions
      • imgresize_lib
    • Mail Functions
      • mailsource_lib
      • sockmail_lib
Powered by GitBook
On this page
  • Proto type
  • Description
  • Arguments
  • Example
  • See also

Was this helpful?

  1. APIs
  2. Charset Functions

ncrencode_lib

Proto type

string ncrencode_lib (string str [, int type])

Description

ncrencode_lib() 함수는 CP949 테이블의 2 byte 문자를 16진수 NCR 코드로 변경을 한다. type 을 1 로 지정했을 경우에는 EUC-KR 의 범위외의 2 byte 문자만 16 진수 NCR 코드로 변경을 한다.

이 함수는 GD 에서 한글을 사용할 때, GD 에 따로 한글 패치를 하지 않고 한글을 사용할때 유용하게 사용할 수 있다.

type 을 1 로 지정할 경우는, MSIE 의 경우에는 KSX1001 이외의 범위를 알아서 NCR 코드로 변환을 해 주나 타 브라우져에서는 잘 지원이 되지 않으므로 다른 브라우져의 호환성을 생각할 때 이 함수를 사용할 수 있다.

Arguments

Example

<?php
$a = "한글a 와 똠방각하";
# return "&#54620;&#44544;a &#50752; &#46624;&#48169;&#44033;&#54616;"
$a = ncrencode_lib ($a);

$a = "한글a 와 똠방각하";
# return "한글a 와 &#46624;방각하"
$a = ncrencode_lib ($a,1);
?>

See also

PreviousCharset FunctionsNextncrdecode_lib

Last updated 5 years ago

Was this helpful?

ncrdecode_lib ()