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

Unicode and CR/LF

former_member299080
Participant
0 Likes
1,274

Hi,

In preparation for Unicode upgrade, all of our HR programs have been upgraded and 'Unicode Checks Active' attribute turned on. In doing so, we made the following code change for "carriage return/line-feed" functionality in several programs.

FROM THIS -> dc_crlf(2) TYPE x VALUE '0D0A',

TO THIS -> ON_CRET TYPE C VALUE CL_ABAP_CHAR_UTILITIES=>CR_LF

Since making the change, it appears the 'CON_CRET' cr_lf is causing characters in the 51st or 52nd position to get dropped if it's the last character in the word. Word wrap is working correctly.

Thanks.

1 ACCEPTED SOLUTION
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
875

Hello Marco,

FROM THIS -> dc_crlf(2) TYPE x VALUE '0D0A',

TO THIS -> ON_CRET TYPE C VALUE CL_ABAP_CHAR_UTILITIES=>CR_LF

I think the declaration for ON_CRET should be


ON_CRET TYPE CHAR2 VALUE CL_ABAP_CHAR_UTILITIES=>CR_LF

I think it will solve the problem.

BR,

Suhas

Hi,

In preparation for Unicode upgrade, all of our HR programs have been upgraded and 'Unicode Checks Active' attribute turned on. In doing so, we made the following code change for "carriage return/line-feed" functionality in several programs.

FROM THIS -> dc_crlf(2) TYPE x VALUE '0D0A',

TO THIS -> ON_CRET TYPE C VALUE CL_ABAP_CHAR_UTILITIES=>CR_LF

Since making the change, it appears the 'CON_CRET' cr_lf is causing characters in the 51st or 52nd position to get dropped if it's the last character in the word. Word wrap is working correctly.

Thanks.

2 REPLIES 2
Read only

former_member156446
Active Contributor
0 Likes
875

If some characters are dropping down then its some thing to do with the code.. how you are concatenating the line feed... lets see the code..

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
876

Hello Marco,

FROM THIS -> dc_crlf(2) TYPE x VALUE '0D0A',

TO THIS -> ON_CRET TYPE C VALUE CL_ABAP_CHAR_UTILITIES=>CR_LF

I think the declaration for ON_CRET should be


ON_CRET TYPE CHAR2 VALUE CL_ABAP_CHAR_UTILITIES=>CR_LF

I think it will solve the problem.

BR,

Suhas