Characters in Programming


This chapter presents a number of ways to represent character and string data in different programming languages, such as FORTRAN, C, C#, Perl, ECMAScript (JavaScript), and Java, and also other languages such as XML and CSS. It explores both the differences and similarities, illustrated with sample programs to perform simple manipulation of string data. The information is presented to introduce you to using Unicode in programming in different languages. You will need to study language manuals and library documentation in order to do some serious programming.

You need to understand some basics of programming to benefit from this chapter. You should be able to write a program that prints "Hello world," and you should know how to declare variables and assign values to them, write expressions and conditional statements, and use subprograms. Here we will discuss the specifics of processing character and string data. One reason for this is that even people who know programming well may get confused with the fundamental concepts and cannot distinguish, for example, between an empty string, a space character, the NUL character, and the digit zero. Programming language tutorials typically discuss the character concept rather briefly, often assuming that only ASCII data will be used.

The International Components for Unicode (ICU) activity, based on the open source principle, is a large collection of subroutines and modules for Unicode support and localization, for use in C, C++, or Java programs. In addition to saving time, the use of ICU helps to create more robust and more easily localizable software.

The chapter also contains a section on locales and especially the Common Locale Data Repository and its future use in disciplined programming. However, we first discuss some older styles of working with characters, mostly to warn about their problems.



Unicode Explained
Unicode Explained
ISBN: 059610121X
EAN: 2147483647
Year: 2006
Pages: 139

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net