Document.characterSet 읽기 전용 속성은 현재 문서가 렌더링에 사용하는 문자 인코딩을 반환합니다.

참고: Document.charsetDocument.inputEncoding 속성은 Document.characterSet의 이전 별칭입니다. 더 이상 사용지 마세요.

예제

<button onclick="console.log(document.characterSet);">
  콘솔에 인코딩 출력
</button>
<!-- "ISO-8859-1"이나 "UTF-8" 등, 문서의 캐릭터 셋 기록 -->

명세

Specification Status Comment
DOM
The definition of 'characterSet' in that specification.
Living Standard Initial definition.

브라우저 호환성

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
characterSetChrome Full support 1
Full support 1
Full support 1
Notes Alternate Name
Notes charset alias was made read-only in 45.
Alternate Name Uses the non-standard name: charset
Full support 1
Alternate Name
Alternate Name Uses the non-standard name: inputEncoding
Edge Full support Yes
Full support Yes
Full support Yes
Alternate Name
Alternate Name Uses the non-standard name: charset
?
Alternate Name
Alternate Name Uses the non-standard name: inputEncoding
Firefox Full support Yes
Full support Yes
Full support 44
Alternate Name
Alternate Name Uses the non-standard name: charset
Full support Yes
Alternate Name
Alternate Name Uses the non-standard name: inputEncoding
IE ?
?
?
Alternate Name
Alternate Name Uses the non-standard name: charset
?
Alternate Name
Alternate Name Uses the non-standard name: inputEncoding
Opera Full support Yes
Full support Yes
?
Alternate Name
Alternate Name Uses the non-standard name: charset
?
Alternate Name
Alternate Name Uses the non-standard name: inputEncoding
Safari Full support Yes
Full support Yes
Full support 9
Alternate Name
Alternate Name Uses the non-standard name: charset
?
Alternate Name
Alternate Name Uses the non-standard name: inputEncoding
WebView Android Full support 45
Full support 45
Full support Yes
Notes Alternate Name
Notes charset alias was made read-only in 45.
Alternate Name Uses the non-standard name: charset
Full support Yes
Alternate Name
Alternate Name Uses the non-standard name: inputEncoding
Chrome Android Full support 45
Full support 45
Full support Yes
Notes Alternate Name
Notes charset alias was made read-only in 45.
Alternate Name Uses the non-standard name: charset
Full support Yes
Alternate Name
Alternate Name Uses the non-standard name: inputEncoding
Firefox Android Full support Yes
Full support Yes
Full support 44
Alternate Name
Alternate Name Uses the non-standard name: charset
Full support Yes
Alternate Name
Alternate Name Uses the non-standard name: inputEncoding
Opera Android Full support Yes
Full support Yes
?
Alternate Name
Alternate Name Uses the non-standard name: charset
?
Alternate Name
Alternate Name Uses the non-standard name: inputEncoding
Safari iOS Full support Yes
Full support Yes
?
Alternate Name
Alternate Name Uses the non-standard name: charset
?
Alternate Name
Alternate Name Uses the non-standard name: inputEncoding
Samsung Internet Android ?

Legend

Full support  
Full support
Compatibility unknown  
Compatibility unknown
See implementation notes.
See implementation notes.
Uses a non-standard name.
Uses a non-standard name.

문서 태그 및 공헌자

이 페이지의 공헌자: mdnwebdocs-bot, alattalatta, dragmove
최종 변경자: mdnwebdocs-bot,