Understanding Unexpected Search Results due to Non-Printing Characters
search cancel

Understanding Unexpected Search Results due to Non-Printing Characters

book

Article ID: 387461

calendar_today

Updated On:

Products

CASB Securlet SAAS CASB Advanced Threat Protection CASB Audit CASB Gateway CASB Gateway Advanced CASB Security Advanced CASB Security Advanced IAAS CASB Security Premium CASB Security Premium IAAS CASB Security Standard CASB Securlet IAAS CASB Securlet SAAS With DLP-CDS

Issue/Introduction

At times, search results may appear unexpected, giving the impression that the search engine is malfunctioning. While technical issues can occur, one common cause that is often overlooked is the presence of non-printing (invisible) characters within the search query.

These characters are typically introduced during copy-paste operations and can significantly affect search behavior. In some cases, non-printing characters function as unintended word separator, similar to spaces. As a result, the search engine may interprets a single keyword as multiple distinct terms without the user's awareness - since these characters are, by definition, invisible.

Cause

Example: The impact of Zero-Width Space (ZWSP)

A common example is the Zero-Width Space (ZWSP) character. if inadvertently inserted into a keyword, such as ABC​XYZ (there is an invisible character between 'C' and 'X'), the search engine may interpret it as two separate terms: "ABC" and "XYZ". the final search behavior will then depend on the engine's default logical operator. For instance, if the search engine applies an OR condition, the query may effectively become "ABC OR XYZ", leading unintended results.

Resolution

How to Detect Non-Printing Characters 

To identify the presence of non-printing characters, it is recommended to use a text editor or tool that displays hidden characters. Notepad++, for example, provides this functionality when properly configured. To enable visibility of these characters in Notepad++:

  1. Open Notepad++
  2. Navigate to View > Show Symbol > Show Non-Printing Characters.
  3. Paste the Search Keyword or phrase in
  4. Observe the displayed keyword and see if there is any difference than what is expected.

 

 

By identifying and removing such characters, users can refine their search queries and achieve more accurate results.

Additional Information

Here is a Table of the Non-Printing Characters for reference.