{"record":{"id":"c9a73b2b6646e25d","repo":"apache/seatunnel","slug":"input-encoding-is-not-supported-encodingname","errorCode":null,"errorMessage":"input.encoding is not supported: ${encodingName} (input id=${inputId})","messagePattern":"input\\.encoding is not supported: (.+?) \\(input id=(.+?)\\)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-edge-agent/seatunnel-edge-agent-connector/src/main/java/org/apache/seatunnel/edge/agent/connector/config/FileCollectConfig.java","lineNumber":157,"sourceCode":"    private static void validateMultilineMatch(String value) {\n        if (!value.equalsIgnoreCase(\"after\") && !value.equalsIgnoreCase(\"before\")) {\n            throw new IllegalArgumentException(\n                    \"input.multiline.match must be \\\"after\\\" or \\\"before\\\".\");\n        }\n    }\n\n    private static void validateOutputType(String value) {\n        if (!value.equalsIgnoreCase(\"line\") && !value.equalsIgnoreCase(\"json\")) {\n            throw new IllegalArgumentException(\n                    \"input.output-format.type must be \\\"line\\\" or \\\"json\\\".\");\n        }\n    }\n\n    private static Charset resolveCharset(String encodingName, String inputId) {\n        try {\n            return Charset.forName(encodingName);\n        } catch (IllegalCharsetNameException | UnsupportedCharsetException e) {\n            throw new IllegalArgumentException(\n                    \"input.encoding is not supported: \"\n                            + encodingName\n                            + \" (input id=\"\n                            + inputId\n                            + \")\",\n                    e);\n        }\n    }\n}\n","sourceCodeStart":139,"sourceCodeEnd":167,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-edge-agent/seatunnel-edge-agent-connector/src/main/java/org/apache/seatunnel/edge/agent/connector/config/FileCollectConfig.java#L139-L167","documentation":"FileCollectConfig.resolveCharset validates input.encoding via Charset.forName. If the name is malformed (IllegalCharsetNameException) or not supported by the JVM (UnsupportedCharsetException), it wraps the cause in this IllegalArgumentException naming the encoding and the input id.","triggerScenarios":"input.encoding set to a typo (\"utf8\", \"UTF_8\"), an alias the JVM does not know, or an empty/whitespace string.","commonSituations":"Using non-canonical charset names assumed valid, running on a JVM without an extended charset provider, or encoding values inherited from OS locale settings.","solutions":["Use a canonical IANA charset name the JVM supports: \"UTF-8\", \"ISO-8859-1\", \"US-ASCII\", \"UTF-16\"","Call Charset.isSupported(name) before deploying the config","Read the wrapped cause (IllegalCharsetNameException vs UnsupportedCharsetException) to distinguish syntax errors from genuinely missing charsets"],"exampleFix":"# before\ninput.encoding = \"utf8\"\n# after\ninput.encoding = \"UTF-8\"","handlingStrategy":"validation","validationCode":"String enc = cfg.get(FileCollectOptions.ENCODING);\nif (!Charset.isSupported(enc)) { throw new IllegalArgumentException(\"input.encoding not supported: \" + enc); }","typeGuard":"boolean isValidCharset(String name) { try { java.nio.charset.Charset.forName(name); return true; } catch (Exception e) { return false; } }","tryCatchPattern":"try { FileCollectConfig.from(config); } catch (IllegalArgumentException e) { log.error(\"Encoding rejected: {}\", e.getMessage(), e.getCause()); }","preventionTips":["Use canonical names like UTF-8, ISO-8859-1 — not aliases like utf8","Check Charset.isSupported(name) for the target JVM before rollout","Beware JVM-specific charset availability on minimal JREs"],"tags":["config","encoding","charset"],"backgroundTag":"invalid-argument-value","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}