代码之家  ›  专栏  ›  技术社区  ›  Bruno Lucattelli

abap webas活动代码页

  •  1
  • Bruno Lucattelli  · 技术社区  · 16 年前

    我需要在一个字符串中连接不同的行。

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

    问题是,当我使用8位/char环境时,我只需要这样做:

    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位/char环境中时,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使用的字节/字符数量?

    谢谢!

    1 回复  |  直到 16 年前
        1
  •  2
  •   PATRY Guillaume    16 年前

    函数tr_get_is_unicode_system指示系统是否使用unicode。 它调用cl_abap_char_utilities类来获取charsize属性(bite/char)(顺便说一下,这个类包含一个cr lf public属性…)

    当做
    纪尧姆