Documentation Center

Troubleshooting an OpenSearch index with an ID containing non-ASCII characters

If you create an OpenSearch index whose ID contains non-ASCII characters, you may run into problems passing that ID to a Powershell script. One solution is to exclusively use OpenSearch indexes that contain only ASCII characters. The other solution is to change your regional settings.

Before you begin

To perform this troubleshooting task, you must be logged in as an administrator-level user of the machine on which you run your Powershell script.

About this task

The following example scenario illustrates the issue:
  • You have successfully created an OpenSearch index and given it an ID containing Japanese characters, for example, コネクター.
  • You now want to remove this index using the ManageElasticsearchIndex.ps1 script.
  • The JSON output being added to OpenSearch contains numerous ???? strings, where コネクター was expected.

The cause of the problem is the Japanese string, which is being passed as a Windows environment variable value. On a Windows instance that is not configured to accept non-ASCII values, the Japanese string is rendered as ????.

Procedure

  1. Open your Windows Control Panel.
  2. In the All Control Panel Items window, select Region.
  3. In the Region dialog that opens, select the Administrative tab.
  4. In the Language for non-Unicode programs area, select Change system locale.
  5. In the Region Settings dialog that opens, select a value for Current system locale that corresponds to the language of the ID you are using. For example, if your ID is written in Japanese characters, select Japanese (Japan).
  6. Select OK to apply your change and close the Region Settings dialog, and OK again to close the Region dialog.
  7. Close the All Control Panel Items window.
  8. Reboot the Windows instance.