SAP Knowledge Base Article - Public

1278932 - Multibyte characters not exported correctly to CSV format from Crystal Reports

Symptom

  • Incorrect characters.
  • Multibyte characters are not exported properly to CSV format.
  • Chinese, Korean, Japanese characters incorrect when exporting to CSV format.
  • When opening a file that was exported to CSV format from Crystal Reports, some of the characters are unrecognizable.

Environment

  • SAP Crystal Reports 2008
  • SAP Crystal Reports 2011
  • SAP Crystal Reports 2013
  • SAP Crystal Reports 2016

Reproducing the Issue

  1. In Crystal Reports, create a report off any data source that contains data in a language like: Chinese, Korean, Japanese,...
  2. Export the report to CSV format.
  3. When opening the report in a text application, or MS Office, it does not display all the characters properly.

Cause

  • When exporting a report to CSV format, it generate a text file using the UTF-8 format, which does not includes all the unicode characters used in multi-byte characters used in Chinese, Korean, Japanese,... and therefore this is why when opening the csv file generated, it does not displays all the correct characters.

Resolution

  • Set the option to generate a file in UTF16 format when exporting to CSV from Crystal Reports, by adding the registry key: UTF16Mode, and setting the value to 1 
        
    WARNING The following resolution involves editing the Microsoft Registry. Using the MS Registry Editor incorrectly can cause serious problems. Use the MS Registry Editor at your own risk. For more information see the SAP Knowledge Base Article 1323322 
         
    1. Close Crystal Reports designer.
           
    2. Open the Microsoft Registry Editor. 
      1. Under the menu "Start" in MS Windows, select "Run"
      2. Type: regedit
         
    3. In the MS Registry Editor, navigate to the path corresponding to the version of Crystal Reports used:
            
      • For Crystal Reports 2008:
          
            HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 12.0\Crystal Reports\Export\CSV
            
      • For Crystal Reports 2011, 2013,2016:
          
            HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Suite XI 4.0\Crystal Reports\Export\CSV
          
        Important Notes:
        - If the last part of the path does not exist, simply add the missing keys.
        - If you are using a 64bit Edition of MS Windows, the registry path will start with: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node
          
    4. Under CSV, add the DWORD Value: UTF16Mode, and set the value to: 1
      1. Right click on the CSV key, and select "New - DWORD Value"
      2. Set the DWORD Value to: UTF16Mode
      3. Set the value of UTF16Mode to: 1

Keywords

exporting, crystal reports, Chinese, Japanese, Korean, double byte characters, multi-byte , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , BI-BIP-CRS , SAP Crystal Server , BI-DEV , Business Intelligence Software Development Kits (SDKs) , Problem

Product

Crystal Reports 2008 V1 ; SAP Crystal Reports 2011 ; SAP Crystal Reports 2013 ; SAP Crystal Reports 2016