Document.characterSet

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 Chrome 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 12
Full support 12
Full support 12
Alternate Name
Alternate Name Uses the non-standard name: charset
Full support 12
Alternate Name
Alternate Name Uses the non-standard name: inputEncoding
Firefox Full support 1
Full support 1
Full support 44
Alternate Name
Alternate Name Uses the non-standard name: charset
Full support 1.5
Alternate Name
Alternate Name Uses the non-standard name: inputEncoding
IE Full support 9
Full support 9
Full support 4
Alternate Name
Alternate Name Uses the non-standard name: charset
Full support 9
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 3
Full support 3
Full support 3
Alternate Name
Alternate Name Uses the non-standard name: charset
Full support 3
Alternate Name
Alternate Name Uses the non-standard name: inputEncoding
WebView Android Full support 1
Full support 1
Full support 1
Notes Alternate Name
Notes charset alias was made read-only in WebView 45.
Alternate Name Uses the non-standard name: charset
Full support 1
Alternate Name
Alternate Name Uses the non-standard name: inputEncoding
Chrome Android Full support 18
Full support 18
Full support 18
Notes Alternate Name
Notes charset alias was made read-only in Chrome 45.
Alternate Name Uses the non-standard name: charset
Full support 18
Alternate Name
Alternate Name Uses the non-standard name: inputEncoding
Firefox Android Full support 4
Full support 4
Full support 44
Alternate Name
Alternate Name Uses the non-standard name: charset
Full support 4
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 1
Full support 1
Full support 1
Alternate Name
Alternate Name Uses the non-standard name: charset
Full support 1
Alternate Name
Alternate Name Uses the non-standard name: inputEncoding
Samsung Internet Android Full support 1.0
Full support 1.0
Full support 1.0
Notes Alternate Name
Notes charset alias was made read-only in Samsung Internet 5.0.
Alternate Name Uses the non-standard name: charset
Full support 1.0
Alternate Name
Alternate Name Uses the non-standard name: inputEncoding

Legend

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