Giter VIP home page Giter VIP logo

cpdetector's Introduction

cpdetector's People

Contributors

r91987 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cpdetector's Issues

UnknownCharset and UnsupportedCharset can't recognized by Charset.forName()

As we all know, method Charset.forName(String) is to get an Charset instance by a canonical name or an alias.
I tested the following codes

System.out.println(StandardCharsets.UTF_8);
System.out.println(Charset.forName(StandardCharsets.UTF_8.name()));

System.out.println(StandardCharsets.UTF_16);
System.out.println(Charset.forName(StandardCharsets.UTF_16.name()));

As I expected, the result is

UTF-8
UTF-8
UTF-16
UTF-16

So I supposed that if I give the code Charset.forName(UnknownCharset.getInstance().name()) OR Charset.forName("void"), I would get an UnknownCharset instance. But exception happends

Exception in thread "main" java.nio.charset.UnsupportedCharsetException: void
         at java.nio.charset.Charset.forName(Charset.java:536)
         at Test.main(Test.java:13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.