www.delorie.com/gnu/docs/gcc/gnat_ug_51.html   search  
 
Buy the book!


Untitled Document

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.2.11 Character Set Control

^-gnati^/IDENTIFIER_CHARACTER_SET=^c

Normally GNAT recognizes the Latin-1 character set in source program identifiers, as described in the Ada 95 Reference Manual. This switch causes GNAT to recognize alternate character sets in identifiers. c is a single character ^^or word^ indicating the character set, as follows:

1
Latin-1 identifiers

2
Latin-2 letters allowed in identifiers

3
Latin-3 letters allowed in identifiers

4
Latin-4 letters allowed in identifiers

5
Latin-5 (Cyrillic) letters allowed in identifiers

9
Latin-9 letters allowed in identifiers

^p^PC^
IBM PC letters (code page 437) allowed in identifiers

^8^PC850^
IBM PC letters (code page 850) allowed in identifiers

^f^FULL_UPPER^
Full upper-half codes allowed in identifiers

^n^NO_UPPER^
No upper-half codes allowed in identifiers

^w^WIDE^
Wide-character codes (that is, codes greater than 255) allowed in identifiers

See section 2.2 Foreign Language Representation, for full details on the implementation of these character sets.

^-gnatW^/WIDE_CHARACTER_ENCODING=^e
Specify the method of encoding for wide characters. e is one of the following:

^h^HEX^
Hex encoding (brackets coding also recognized)

^u^UPPER^
Upper half encoding (brackets encoding also recognized)

^s^SHIFT_JIS^
Shift/JIS encoding (brackets encoding also recognized)

^e^EUC^
EUC encoding (brackets encoding also recognized)

^8^UTF8^
UTF-8 encoding (brackets encoding also recognized)

^b^BRACKETS^
Brackets encoding only (default value)
For full details on the these encoding methods see See section 2.2.3 Wide Character Encodings. Note that brackets coding is always accepted, even if one of the other options is specified, so for example `-gnatW8' specifies that both brackets and UTF-8 encodings will be recognized. The units that are with'ed directly or indirectly will be scanned using the specified representation scheme, and so if one of the non-brackets scheme is used, it must be used consistently throughout the program. However, since brackets encoding is always recognized, it may be conveniently used in standard libraries, allowing these libraries to be used with any of the available coding schemes. scheme. If no `-gnatW?' parameter is present, then the default representation is Brackets encoding only.

Note that the wide character representation that is specified (explicitly or by default) for the main program also acts as the default encoding used for Wide_Text_IO files if not specifically overridden by a WCEM form parameter.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003