on 04-16-2009 4:51 AM
Hi,
I am having a problem with Japanese Character.
+ycomment(132) type c.+
+ycomment receives text from read text FM.+
+clear V_CHAR52.+
+V_CHAR52 = ycomment(52).+
Here are the scenarios.
* ycomment
= Pooulated in Japanese testing testing testing by Lore testing testing
v_char52(displayed in form)
= Pooulated in Japanese testing testing testing by Lor
* ycomment
= u308Fu305Fu304Fu306Eu540Du524Du306Fu5C0Fu5C71u5FB3u9053u3067u3059u79C1u306Eu540Du524Du306Fu5C0Fu5C71u5FB3u9053u3067u3059u308Fu305Fu304Fu306Eu540Du524Du306Fu5C0Fu5C71u5FB3u9053u3067
v_char52(displayed in form)
= u308Fu305Fu304Fu306Eu540Du524Du306Fu5C0Fu5C71u5FB3u9053u3067u3059u79C1u306Eu540Du5C0Fu524Du5C71u306Fu5FB3u5C0Fu9053u5C71u3067u5FB3u9053u3067u3059u308Fu305Fu304Fu306Eu540Du524Du306F
CAn u please explain the issue a bit more
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks for the help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It is not indicated that it must be cut off up to 52 characters but up to 52 byte.
How can we make the strings or characters be cut in bytes
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
for Byte processing your data object is of data type (X or xstring) and
for char-string processing data object is of data type (C, N, D, T and string).
in non-Unicode systems the length of a character is one byte, but in Unicode system the length of a character depends on which unicode character representation used.
for most of the asian countries 1byte = 2 char.
Ah yeah, i got it so when your characters are unicodes it does consumes all 2 bytes.
if i used in the form the font DBgothic does it says that all my characters has 2 bytes? as i have check it now, it does. please confirm.
the problem now how can i check the language or unicode type of the string i have get. like the v_char52?
the thing i did for now ithink this is stupid is
IF gv_char52 CA 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghiljklmnopqrstuvwxyz'.
gv_char52 = gs_footer-ycomment(52).
ELSE.
gv_char52 = gs_footer-ycomment(26).
ENDIF.
hi
this will give you clear picture about Byte processing and Character processing.
in case of byte processing
DATA : test TYPE X LENGTH 16, " here check length only 16
test1 TYPE Xstring.
test = '000102030405060708090A0B0C0D0E0F'. " but here passing string of 32
test1 = '00537'.
IF test byte-ca test1.
WRITE : test.
ENDIF.
In case of Char-String processing
DATA : test TYPE c LENGTH 32, " here check length only 32
test1 TYPE string.
test = '000102030405060708090A0B0C0D0E0F'. " but here passing string of 32
test1 = '00537'.
IF test ca test1.
WRITE : test.
ENDIF.
may be this comparison is helpfull for you.
if any point you want to convert your text in byte procsseing mode
use
CONVERT TEXT text INTO SORTABLE CODE hex.
1. The data object text must be of type c or string .
2. and the data object hex must be byte-type (X or Xstring)
for example
DATA : text TYPE c LENGTH 50 VALUE 'わたくの名前は小山徳道です私の名前は小山徳道ですわたくの名前は小山徳道で'.
DATA : hex TYPE xstring.
********SET LOCALE LANGUAGE 'D'.
CONVERT TEXT text INTO SORTABLE CODE hex.
WRITE : text.
WRITE : hex.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.