Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Substring between unicode and non-unicode

Former Member
0 Likes
461

Hi, experts,

We are upgrading our system from 4.7 to 6.0 in chinese, but after that, there is a problem:

we have a program which hadle some txt files which create by an non-sap and non-unicode system,

for example, there is a line contains '你好 1234', we will extract the information as below:

data: field1 type string, field2 type string.

field1 = line+0(10).

field2 = line+10(4).

the result in 4.7 is:

field1 = '你好'

field2 = '1234'

but, in ECC, field1 is '你好12' and field2 is '34'.

can any one help me? thank you!

2 REPLIES 2
Read only

Former Member
0 Likes
404

Hi

My system is unicode, but '你好 1234' is 7 char long

Anyway u need to consider the single CHAR in an unicode system needs 2 digit

Max

Read only

0 Likes
404

hey, max, thanks for your help!

I am sorry I did not show my question clearly!

There are 6 space between '你好' and '1234 in the line '你好 1234', and in the top 10 charaters of this string line, may be all numbers, may be all chinese charaters, may be numbers and chinese charaters together.

in 4.7, line+0(10) aways correct, but in ECC, because it is a unicode system, so, it is correct only when the string is all single-byte charaters but not any double-byte charaters.