legacy-knowledge-base
公開されました Jun. 30, 2025

Some result searches for the same document can show text with replacement characters (�)

written-by

Ricardo Couso

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

Issue

  • A text document (such as a PDF) has been added to the document library.
  • Searching by a piece of text in the file, the result includes an excerpt with regular text including the search string.
  • Searching by a piece of text only in the title, the result includes an excerpt with many replacement characters (�).

Environment

  • Liferay DXP 7.3, 7.4
  • Quarterly Release 2023.Q3-2024.Q4

Resolution

  • When a document is added to the document library, the title, metadata and text are indexed (up to the value established in the property dl.file.indexing.max.size).
  • When searching, the result includes an excerpt of the text, including the searched string, if found, or starting from the beginning, if not.
  • If the document has a mix of encoding systems (e.g., UTF-8 and Latin-1), all the byte sequences that can't be interpreted in UTF-8 will be substituted by the replacement character (�).
  • To avoid this behavior, review the document and make sure the encoding is uniform.
did-this-article-resolve-your-issue

legacy-knowledge-base