当前位置:网站首页>ABAP file operations involved in the Chinese character set of problems and solutions for trying to read
ABAP file operations involved in the Chinese character set of problems and solutions for trying to read
2022-08-10 13:19:00 【Wang Zixi】
In practical projects, especially some system integration projects, we often encounter scenarios where we need to receive and parse the binary stream sent from the remote end.The content of this binary stream may be some binary files, such as files in PDF, JPG and other formats, or may be text files.For text files, we need to restore the binary stream to human-readable text.This is the topic that this article will focus on.
Before starting this step, please be sure to complete the previous chapters:
How to upload local files in binary mode in ABAP report
This pre-chapter uploads the text file to the ABAP server in binary form to simulate a binary stream provided by a remote content provider (Content Provider), the type is xstring. The actual content of these binary streams is some text containing Chinese characters. Our task in this article is to convert these binary streams back into user-readable text, and then print them out.
We create a new text file, enter a Chinese character wang, save the file name as wang-utf8.txt, select UTF-8 for encoding.

The size of this file is shown as 3 bytes.This is expected behavior, because UTF-8 is an implementation of Unicode, and the Unicode value of a Chinese character ranges from 0X4E00 to 0x9FA5, which requires 3 bytes if UTF-8 is encoded.
Below we will perform various operations on the text file containing this Chinese character in the ABAP code.
For a detailed introduction, please see this article.







Summary
When using ABAP to perform file operations containing Chinese characters, first of all, it must be clear which character set the current Chinese characters are encoded according to, and then find the number of the character set in the ABAP system from the ABAP database table TCP00, to ensure that the binary stream containing Chinese content matches the incoming ABAP Encoding value, so that the correct processing result can be obtained.
边栏推荐
- Merge similar items in LeetCode simple questions
- Nanodlp v2.2/v3.0 light curing circuit board, connection method of mechanical switch/photoelectric switch/proximity switch and system state level setting
- ArcMAP has a problem of -15 and cannot be accessed [Provide your license server administrator with the following information:Err-15]
- 22家!北京昌平区通报存在食品安全问题餐饮服务企业
- LeetCode简单题之合并相似的物品
- “68道 Redis+168道 MySQL”精品面试题(带解析)
- Wirshark common operations and tcp three-way handshake process example analysis
- 浙大、阿里提出DictBERT,字典描述知识增强的预训练语言模型
- 漏洞管理计划的未来趋势
- 神经网络可视化有3D版本了,美到沦陷!(已开源)
猜你喜欢

中科院深圳先进技术院合成所赵国屏院士组2022年招聘启事

【ECCV 2022|百万奖金】PSG大赛:追求“最全面”的场景理解

shell:正则表达式及三剑客grep命令

瑞幸「翻身」?恐言之尚早

关于flask中static_folder 和 static_url_path参数理解

shell:常用小工具(sort、uniq、tr、cut)

Merge similar items in LeetCode simple questions

表中存在多个索引问题? - 聚集索引,回表,覆盖索引

Reversing words in a string in LeetCode

2022-08-09:以下go语言代码输出什么?A:否,会 panic;B:是,能正确运行;C:不清楚,看投票结果。 package main import ( “fmt“ “syn
随机推荐
跨域的五种解决方案
Mysql—— 内连接、左连接、右连接以及全连接查询
Codeforces Round #276 (Div. 1) B. Maximum Value
11+ chrome高级调试技巧,学会效率直接提升666%
[Advanced Digital IC Verification] Difference and focus analysis between SoC system verification and IP module verification
iTextSharp操作PDF
“68道 Redis+168道 MySQL”精品面试题(带解析)
shell:正则表达式及三剑客grep命令
Pod生命周期
mSystems | 中农汪杰组揭示影响土壤“塑料际”微生物群落的机制
Blast!ByteDance successfully landed, only because the interview questions of LeetCode algorithm were exhausted
来看Prada大秀吗?在元宇宙里那种!
大佬们有遇到过这个问题吗? MySQL 2.2 和 2.3-SNAPSHOT 都这样,貌似是
矩阵键盘&基于51(UcosII)计算器小项目
LeetCode·297.二叉树的序列化与反序列化·DFS·BFS
I would like to ask the big guys, how to solve this error when cdc oracle initializes a 3 million table task running
Keithley DMM7510精准测量超低功耗设备各种运作模式功耗
用低代码驱动IT现代化
【iOS】Organization of interviews
MySQL面试题——MySQL常见查询