2010-03-10 16 views
1

我需要連接字符串中的不同行。ABAP WebAS Active Codepage

爲此,我需要使用CR + LF十六進制字符。

的問題是,當我使用的是8位/字符的環境,我需要做的僅僅是這樣的:

constants : c_lf type x value '10'. 

constants : c_cr type x value '13'. 

data : g_html type string. 

concatenate '<html>' c_cr c_lf into g_html. 

,但是,當我在16位/炭環境很,X變量不代表CR和LF的正確十六進制表示。

所以,我應該用這樣的:

constants : c_lf(2) type x value '0010'. 

constants : c_cr(2) type x value '0013'. 

data : g_html type string. 

concatenate '<html>' c_cr c_lf into g_html. 

那麼,有什麼辦法找出字節/焦炭在使用中通過ABAP WebAS量?

謝謝!

回答

2

函數TR_GET_IS_UNICODE_SYSTEM指示系統是否使用unicode。 它調用CL_ABAP_CHAR_UTILITIES類來獲取CHARSIZE屬性(咬/字符)(順便說一句,這個類包含一個CR_LF公共屬性...)

問候
紀堯姆