{"record":{"id":"289cb1b8e2823a23","repo":"languagetool-org/languagetool","slug":"non-breaking-space-found-in-line-linecount","errorCode":null,"errorMessage":"Non-breaking space found in line #\" + lineCount + \": '\" + line + \"', please remove it","messagePattern":"Non-breaking space found in line #\" \\+ lineCount \\+ \": '\" \\+ line \\+ \"', please remove it","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"languagetool-core/src/main/java/org/languagetool/tagging/ManualTagger.java","lineNumber":105,"sourceCode":"    Map<String, List<TaggedWord>> map = new HashMap<>();\n    try (\n      InputStreamReader reader = new InputStreamReader(inputStream, StandardCharsets.UTF_8);\n      BufferedReader br = new BufferedReader(reader)\n    ) {\n      String line;\n      int lineCount = 0;\n      String separator = DEFAULT_SEPARATOR;\n      while ((line = br.readLine()) != null) {\n        line = line.trim();\n        lineCount++;\n        if (line.startsWith(\"#separatorRegExp=\")) {\n          separator = line.replace(\"#separatorRegExp=\", \"\");\n        }\n        if (StringTools.isEmpty(line) || line.charAt(0) == '#') {\n          continue;\n        }\n        if (line.contains(\"\\u00A0\")) {\n          throw new RuntimeException(\"Non-breaking space found in line #\" + lineCount + \": '\" + line + \"', please remove it\");\n        }\n        line = StringUtils.substringBefore(line, \"#\").trim();\n        String[] parts = line.split(separator);\n        if (parts.length != 3) {\n          throw new IOException(\"Unknown line format in line \" + lineCount + \" when loading manual tagger dictionary, \" +\n            \"expected three tab-separated fields: '\" + line + \"'\");\n        }\n        String form = parts[0];\n\n        String lemma = parts[1];\n        if (lemma.equals(form)) lemma = form;\n        lemma = intern(lemma);\n\n        String tag = parts[2].trim();\n        String internedTag = internTags ? tag.intern() : intern(tag);\n        map.computeIfAbsent(form, __ -> new ArrayList<>()).add(new TaggedWord(lemma, internedTag));\n      }\n    }","sourceCodeStart":87,"sourceCodeEnd":123,"githubUrl":"https://github.com/languagetool-org/languagetool/blob/2e990059ce67d5e2a0f7f7ca5d31160c6709df4b/languagetool-core/src/main/java/org/languagetool/tagging/ManualTagger.java#L87-L123","documentation":"Input validation while parsing the manual tagging dictionary: a line contains U+00A0, which looks like a normal space but breaks tokenization and separator splitting silently. The loader refuses the whole file up front so authors fix the source file rather than get wrong tags.","triggerScenarios":"Thrown at languagetool-core/src/main/java/org/languagetool/tagging/ManualTagger.java:105 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Replace the non-breaking space (U+00A0) on the given line with a regular space","Re-save the file with a plain editor or run a sanitizer like sed 's/\\xC2\\xA0/ /g'","Enable editor 'show whitespace' to spot invisible NBSPs"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2e990059ce67d5e2a0f7f7ca5d31160c6709df4b","analyzedAt":"2026-09-06T09:20:17.015Z","contentChangedAt":"2026-09-06T09:20:17.015Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}