SAP Knowledge Base Article - Public

1381498 - Chinese, Korean or Japanese characters show as question marks when exporting the report to Text Format from Crystal Reports

Symptom

  • Incorrect characters.
  • Report exported to text shows question marks.
  • Report export to text format from Crystal Reports, shows the Chinese, or Korean, or Japanese characters as question marks.

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.
  2. Insert Database Fields on the report that contains Chinese, Korean or Japanese characters.
  3. Export the report to Text Format.
  4. When opening the exported report in a Text Editor, notice that some of the characters shows as question marks. ( ??? )

Cause

  • The driver that export a report to Text Format, uses CP_ACP (Ansi code page) to convert the Unicode string to Ansi string, therefore, when the Ansi code page doesn't support the Chinese, Korean or Japanese characters, the exported result won't show correctly.
           
  • The issue has been identified and logged under Problem Report ID ADAPT01186208

Resolution

  • To export a report to Text Format using UTF8 to keep the unicode characters, instead of ANSI, add the registry key: UseUTF8Encoding, and set 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. If you are using Crystal Reports 2008, ensure you are using Service Pack 3 or above. ( The registry key was added from that version )
           
    2. Close Crystal Reports designer.
        
    3. Open the Microsoft Registry Editor. ( regedit )
        
    4. In the MS Registry Editor, navigate to the path corresponding to the version of Crystal Reports used:
            
      • For Crystal Reports 2008:
         
        • For 32bit version of MS Windows:
          • HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 12.0\Crystal Reports\Export\Text
              
        • For 64bit version of MS Windows:
          • HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Business Objects\Suite 12.0\Crystal Reports\Export\Text
                 
                
      • For Crystal Reports 2011, 2013, 2016:
             
        • For 32bit version of MS Windows:
          • HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Suite XI 4.0\Crystal Reports\Export\Text
                
        • For 64bit version of MS Windows:
          • HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Suite XI 4.0\Crystal Reports\Export\Text
             
              
      • Note: If the last part of the path does not exist, simply add the missing keys.
         
          
    5. Under Text, add the DWORD Value: UseUTF8Encoding, and set the value to: 1
      1. Right click on the Text key, and select "New - DWORD Value"
      2. Set the DWORD Value to: UseUTF8Encoding
      3. Set the value to: 1  

Notes:
- If the value is "0" or if it doesn't exist (by default), it will export in ANSI format.
- If the value is set to "1", the exported file will be encoded using UTF-8 and have the UTF-8 BOM at the beginning.

Keywords

Crystal report, Exporting, txt, text. CR , KBA , BI-RA-CR , Crystal Reports designer or BusinessViews Manager , Bug Filed

Product

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