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

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

예제

<button onclick="console.log(document.characterSet);">
  콘솔에 인코딩 출력
</button>
<!-- "ISO-8859-1" 이나 "UTF-8" 과 같은, document의 character set을 반환합니다. -->

명세

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 AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic supportChrome 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
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 ?
?
?
Alternate Name
Alternate Name Uses the non-standard name: charset
?
Alternate Name
Alternate Name Uses the non-standard name: inputEncoding
Safari ?
?
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
Alternate Name
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
Alternate Name
Alternate Name Uses the non-standard name: charset
Full support Yes
Alternate Name
Alternate Name Uses the non-standard name: inputEncoding
Edge Mobile 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 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 ?
?
?
Alternate Name
Alternate Name Uses the non-standard name: charset
?
Alternate Name
Alternate Name Uses the non-standard name: inputEncoding
Safari iOS ?
?
?
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.

문서 태그 및 공헌자

이 페이지의 공헌자: urty5656, dragmove
최종 변경자: urty5656,