https://github.com/lovasoa/replacement-charset-java
"replacement" charset implementation in java
https://github.com/lovasoa/replacement-charset-java
charset web-standards xss
Last synced: 6 months ago
JSON representation
"replacement" charset implementation in java
- Host: GitHub
- URL: https://github.com/lovasoa/replacement-charset-java
- Owner: lovasoa
- License: bsd-3-clause
- Created: 2018-06-29T10:23:45.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-03-26T17:16:35.000Z (over 1 year ago)
- Last Synced: 2025-02-08T23:42:45.774Z (8 months ago)
- Topics: charset, web-standards, xss
- Language: Java
- Size: 13.7 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# *replacement* charset implementation in java
Implementation of
[the replacement charset](https://encoding.spec.whatwg.org/#replacement)
in java.This charset defined by the W3C is implemented by all major browsers.
According to the W3C:
> The replacement encoding exists to prevent certain attacks
> that abuse a mismatch between encodings supported on the server
> and the client.This dummy charset is **not ASCII-compatible**, has only a decoder,
and decodes any byte stream to a single '�' (0+FFFD) replacement character.It is used in web standards as a replacement charset for the following
legacy charsets:* csiso2022kr
* hz-gb-2312
* iso-2022-cn
* iso-2022-cn-ext
* iso-2022-krThis java implementation could be used to decode web pages that were served in
one of the above charsets, in order to decode the pages in exactly the same way
as they would appear in a browser.