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 concept

Former Member
0 Likes
1,732

Hi,

can somebody please explain me what is the unicode concept in abap.

please don't give me any links and copy it from somewhere else.

regards,

Hi,

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,222

Hi,

In the older SAP version, Unicode was not present , which made it impossible for some East Asian countries like China , Japan , Korea etc to use SAP as their language was not supported by SAP. Until then SAP supported only ASCII and EBCDIC character sets.

In order to provide better compatibililty and services to East Asian Countries, SAP introduced Unicode. It is also an encoding technique like ASCII that follows ISO standards and covers almost all languages.

In this each character uses 2 bytes and this allows 65534 different combinations of characters.

Reward if helpful.

Regards.

4 REPLIES 4
Read only

ak_upadhyay
Contributor
0 Likes
1,222

Hi,

Unicode:

A 16-bit character encoding scheme allowing characters from Western European, Eastern European, Cyrillic, Greek, Arabic, Hebrew, Chinese, Japanese, Korean, Thai, Urdu, Hindi and all other major world languages, living and dead, to be encoded in a single character set. The Unicode specification also includes standard compression schemes and a wide range of typesetting information required for worldwide locale support. Symbian OS fully implements Unicode. A 16-bit code to represent the characters used in most of the world's scripts. UTF-8 is an alternative encoding in which one or more 8-bit bytes represents each Unicode character. A 16-bit character set defined by ISO 10646. A code similar to ASCII, used for representing commonly used symbols in a digital form. Unlike ASCII, however, Unicode uses a 16-bit dataspace, and so can support a wide variety of non-Roman alphabets including Cyrillic, Han Chinese, Japanese, Arabic, Korean, Bengali, and so on. Supporting common non-Roman alphabets is of interest to community networks, which may want to promote multicultural aspects of their systems.

ABAP Development under Unicode

Prior to Unicode the length of a character was exactly one byte, allowing implicit typecasts or memory-layout oriented programming. With Unicode this situation has changed: One character is no longer one byte, so that additional specifications have to be added to define the unit of measure for implicit or explicit references to (the length of) characters.

Character-like data in ABAP are always represented with the UTF-16 - standard (also used in Java or other development tools like Microsoft's Visual Basic); but this format is not related to the encoding of the underlying database.

A Unicode-enabled ABAP program (UP) is a program in which all Unicode checks are effective. Such a program returns the same results in a non-Unicode system (NUS) as in a Unicode system (US). In order to perform the relevant syntax checks, you must activate the Unicode flag in the screens of the program and class attributes.

In a US, you can only execute programs for which the Unicode flag is set. In future, the Unicode flag must be set for all SAP programs to enable them to run on a US. If the Unicode flag is set for a program, the syntax is checked and the program executed according to the rules described in this document, regardless of whether the system is a US or a NUS. From now on, the Unicode flag must be set for all new programs and classes that are created.

If the Unicode flag is not set, a program can only be executed in an NUS. The syntactical and semantic changes described below do not apply to such programs. However, you can use all language extensions that have been introduced in the process of the conversion to Unicode.

As a result of the modifications and restrictions associated with the Unicode flag, programs are executed in both Unicode and non-Unicode systems with the same semantics to a large degree. In rare cases, however, differences may occur. Programs that are designed to run on both systems therefore need to be tested on both platforms.

Reward points if useful....

Regards

AK

Read only

Former Member
0 Likes
1,222

Unicode provides a unique number for every character,

no matter what the platform,

no matter what the program,

no matter what the language.

Read only

Former Member
0 Likes
1,223

Hi,

In the older SAP version, Unicode was not present , which made it impossible for some East Asian countries like China , Japan , Korea etc to use SAP as their language was not supported by SAP. Until then SAP supported only ASCII and EBCDIC character sets.

In order to provide better compatibililty and services to East Asian Countries, SAP introduced Unicode. It is also an encoding technique like ASCII that follows ISO standards and covers almost all languages.

In this each character uses 2 bytes and this allows 65534 different combinations of characters.

Reward if helpful.

Regards.

Read only

Former Member
0 Likes
1,222

Hi

From Release 6.10, ABAP supports multi-byte coding for characters in Unicode. Prior to Release 6.10, ABAP used only character sets that were based on single-byte codes – such as ASCII and EBCDIC – or double-byte codes, such as SJIS and BIG5.

This switch to Unicode affects all statements where an explicit or implicit assumption is made about the internal length of a character. If you use these statements in a program that is designed to exploit the Unicode capabilities of the runtime environment, they must be checked and changed if necessary. Once a Unicode-enabled program has been changed accordingly, it behaves in the same way in both Unicode and non-Unicode systems. You can develop programs in a non-Unicode system (NUS) and then import them into a Unicode system (US). The following sections describe the conversions that are necessary:

http://help.sap.com/saphelp_nw04/helpdata/en/62/3f2cadb35311d5993800508b6b8b11/frameset.htm