Package org.postgresql.core

# Class EncodingPredictor

java.lang.Object
org.postgresql.core.EncodingPredictor

public class EncodingPredictor extends Object
Predicts encoding for error messages based on some heuristics.

1. For certain languages, it is known how "FATAL" is translated
2. For Japanese, several common words are hardcoded
3. Then try various LATIN encodings

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `EncodingPredictor.DecodeResult`
  In certain cases the encoding is not known for sure (e.g.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `EncodingPredictor()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static @Nullable EncodingPredictor.DecodeResult`
  `decode(byte[] bytes, int offset, int length)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### EncodingPredictor

    public EncodingPredictor()

- ## Method Details

  - ### decode

    public static @Nullable EncodingPredictor.DecodeResult decode(byte[] bytes, int offset, int length)