deepseek-ai / deepseek-ai/DeepSeek-LLM
Generated plain text contains non‑breaking spaces (U+00A0) causing words to merge when pasted into word processors
- Dominant language
- Makefile
- Stars
- 7.3k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
Issue Description
When plain text is generated by the system and pasted into a word processor (e.g., Microsoft Word, Google Docs), some spaces between words behave incorrectly. Instead of acting as standard breakable spaces, they are interpreted as non‑breaking spaces (Unicode U+00A0). This causes adjacent words to stick together into a single unbreakable unit, disrupting normal text wrapping and formatting.
The problem is most noticeable:
Within and around formatted spans (e.g., bold or italic text) where individual words are marked up separately.
Near variables, numbers, or special characters.
In any context where the system outputs a space that should be a regular U+0020 but instead becomes U+00A0.
Steps to Reproduce
Generate a multi‑paragraph plain text output that includes per‑word emphasis (e.g., each important word individually marked as bold) or mixed formatting.
Copy the entire text as plain text.
Paste it into Microsoft Word, Google Docs, or a similar word processor.
Observe the line‑wrapping behavior. Notice that some word groups (e.g., “for 2LoD independent review of”) act as one long word and do not break across lines.
Manually delete the space between the joined words and re‑type a space using the keyboard. The words then wrap correctly, confirming the original space was a non‑breaking space.
Expected Behavior
All spaces between words should be regular, breakable spaces (U+0020). When pasted into a word processor, text should wrap naturally at any space character, regardless of adjacent formatting.
Actual Behavior
Certain spaces are output as non‑breaking spaces (U+00A0). Word processors treat these as part of the word, preventing line breaks between the joined words. This results in text that cannot reflow correctly and requires manual correction.
Technical Context
The issue originates in the system’s text generation, not in the word processor.
Plain text containing U+00A0 characters will always exhibit this problem in any application that respects non‑breaking spaces.
The problem is reproducible across different formatting styles and is not limited to a single use case.
Proposed Fix
Ensure the system outputs only regular spaces (U+0020) in all generated text.
Implement a post‑processing step that strips or replaces any non‑breaking space characters (U+00A0) with standard spaces.
Add a validation check in the output pipeline to detect and flag or automatically convert U+00A0 instances.
Workaround (for end‑users)
If you receive text that exhibits this issue:
Paste the text into a plain‑text editor (Notepad, VS Code, etc.).
Use Find & Replace to locate non‑breaking spaces. In many editors, you can search for \u00A0 or copy an affected space directly from the document.
Replace all instances with a regular space.
Re‑copy the cleaned text into your word processor.
Training / Quality Assurance Considerations
Include detection of non‑breaking spaces in automated content tests.
Train content moderators or QA reviewers to recognize the symptom (words that refuse to wrap) and understand that the root cause is a Unicode character, not a user formatting error.
Update documentation for downstream consumers to explain the workaround and recommend the use of plain‑text editors for bulk correction when the issue occurs.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.