如何進行各種碼制資料之間轉換

2021-04-14 02:26:29 字數 1910 閱讀 2109

1 系統內部轉換命令(一般建議不直接使用) 

system-call convert id id data data

encoding encoding

endian endian

ignore_cerr ignore_cerr n n

position position

replacement replacement

len len

buffer buffer

err err.

text and lines are converted between different formats.

2 使用sap系統封裝的類cl_abap_conv_in_ceandcl_abap_conv_out_ce

樣例data  str type c.

data: s type string,

len type i.

data: cvti_utf8 type ref to cl_abap_conv_in_ce.

field-symbols :

type x.

assign str to

casting.

cvti_utf8 =  cl_abap_conv_in_ce=>create( encoding = 'utf-8' input    =

).call method cvti_utf8->read

importing

data = s

len  = len

exceptions others = 1.

str = s.

3 使用sap封裝的form

要包含以下單元:rscpicinc

封裝的form

conv_to_ascii

conv_to_ebcdic

conv_to_utf8

conv_from_ascii

conv_from_ascii

conv_from_ebcdic

4使用sap封裝的函式(外部->系統預設**,系統預設**->外部)

function translate_codepage_in.

*"  importing

*"     value(codepage_from) type  abap_encod

*"  tables

*"      t_data

*"  exceptions

*"      error_translate

function translate_codepage_out.

*"  importing

*"     value(codepage_from) type  abap_encod

*"  tables

*"      t_data

*"  exceptions

*"      error_translate

5使用translate命令

translate c ...from code page g1...     to code page g2.

6 常見**編號

ebcdic = '0100'

ascii  =  '1100'

utf8 = 'utf-8'

7 相關的元素

abap_encod

tcp00(表)

Express框架與html之間如何進行資料傳遞

關於node.js 的express框架介紹,推薦看菜鳥教程的express框架,很適合入門,這裡不再贅述,這裡主要講一下express框架與html之間如何進行資料傳遞 我採用的是 jquery的ajax 向後台傳參方式 url傳參 1 type屬性為get時 1 第一種方法 通過url傳參 fu...

如何進行資料同步

建立資料庫的鏈結 create database link dblink test connect to 需要鏈結的資料庫的名字 identified by 密碼 using 這個鏈結的別名 建立物化檢視用於同步資料 create materialized view test test是同步過來的實...

如何進行網頁抓取資料??

最近老是做導資料,有時候沒有舊庫了,我們可以從老網頁抓取資料 主要思路 通過把網頁轉換成doc式的html,然後進行獲取元素的值 我來寫個案例 這是目標網頁 要抓取的資料 這是html 我們用f12都能看到的 不多說,直接上 publicdocument getdoc string url catc...