08-18-2021 12:32 PM
Hi all ,
I am having a text DATA1 which is a mixture of english and japanese.
I need to store it in a variable VAR of type C and length 15.
If data1 = 血液型ar .., it's length is 8. ( Japanese text are considered as 2 bytes )
So , when assigning DATA1 to VAR , VAR = 血液型arXXXXXXX. ( X represents the space )
But , what is happening is , VAR = 血液型arXXXXXXXXXX. ( extra spaces are added , as Japanese letters are taken as single byte ).
Can anyone please provide solution for this ?
08-18-2021 2:01 PM
I don't really understand what you mean. If your SAP system is Unicode, all characters are 2 bytes (*). So the result you obtain is correct.
EDIT: (*)
except a Unicode character in the range U+010000 U+10FFFF which occupies 2 characters.
If I take your first character “血”, it's U+8840, so it occupies 1 character.