SAP Knowledge Base Article - Public

1714916 - Chinese characters which used in ExtractString() function get garbled in Crystal Report on Japanese environment

Symptom

  • Chinese characters which used in ExtractString() function get garbled

Environment

  • Crystal Reports 2008
  • Japanese OS & Product locale

Reproducing the Issue

  1. Log in Crystal Report 2008.
  2. Create a new report and create an new formula field [test1] as Chinese string "卡达发达尔-哈萨萨法萨".
  3. Create another formula field [test2] to fetch the partial string as "ExtractString({@test1},"-","_")".
  4. Drag the fields to report.
    => The data returned from [test2] got garbled.
  5. Save the report to repository and view from InfoView.
    => The gata got garbled too. 

Cause

For ExtractString() function, it turns the content into the code by the Preferred Viewing Locale setting in the Crystal Report Designer. That is why we see the ExtractString() result changes by changing the Preferred viewing Locale setting. It turns the Characters from Unicode into Japanese code and then process it according to the ExtractString() setting. For some Chinese characters like '哈' or '法' can be found in Japanese so you will see it displayed correctly but others like '萨' or '卡' which can't be found in Japanese then it will have display problem. We can also prove this by change your extractString function to ExtractString({@new},"萨","_") you will find the result is wrong, while if you use ExtractString({@new},"哈","_"), the result is correct. This means system can't recognize '萨' at all.

Resolution

Workaround:

Change the operating system non-Unicode setting of client side machine ('Control Panel'->'Regional and Language Options'->'Advanced') into Chinese.

See Also

The issue also occurred when viewing the Crystal Report from InfoView and currently there's no workaround to resolve the issue
on InfoView. This issue is judged as by design after further investigation by developer.

Keywords

cr, variable, double bytes, cut, invisible, ZH, CH, show, JP env , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem

Product

Crystal Reports 2008 V0 ; Crystal Reports 2008 V1 ; SAP Crystal Reports 2011 ; SAP Crystal Reports 2011, feature pack 03