Non English characters is shown as Garbled Text when updating in postgres database through cmd

Non English characters is shown as Garbled Text when updating in postgres database through cmd


Issue : 

      Non English characters is shown as Garbled Text when updating in postgres database through command prompt. say for example, 同意(自动通过) is being saved as ͬÒâ(×Ô¶¯Í¨¹ý) when updating via windows command prompt.

Reference Ticket : #8633870

Root Cause : 

  1. In some of the customer environments, the default encoding of  command prompt may differ from "UTF-8" . such encoding may not handle all the non -english data effectively. The root cause of this issue is, character encoding mismatch or misinterpretation during the data update process.
  2. This issue can occur in Postgres less than 11.17 i-e Build version less than 14300.
Solution :
  1. This is a known issue from the Postgres side. This issue is fixed in Postgres version 11.17. We can resolve it by, either upgrading the setup to 14300 or changing the encoding to "UTF-8". We are highly recommending you upgrade to build 14300. If it is not possible, you can resolve it executing the below command in command prompt of the corresponding machine where query is executed.

  1. #Command to change the encoding to "UTF-8" 
  2. chcp 65001


                    New to ADSelfService Plus?