Supported character sets
Overview
This page lists the languages and character encodings that CAST Imaging supports when analyzing source code, and explains what happens when the delivered source code contains a character that is not supported.
Supported languages with Unicode for analysis
The following languages are supported with Unicode:
- Albanian
- Belarusian
- Bosnian
- Bulgarian
- Catalan
- Chinese
- Croatian
- Czech
- Danish
- Dutch
- English
- Estonian
- Faroese
- Finnish
- French
- German
- Greek
- Greenlandic Inuktitut
- Hungarian
- Icelandic
- Irish
- Italian
- Japanese - EUC-JP and
ISO_2022_JP_3are not supported - Latvian
- Lithuanian
- Luxembourgish
- Macedonian
- Maltese
- Moldovan
- Norwegian
- Polish
- Portuguese
- Romanian
- Russian
- Serbian
- Slovak
- Slovenian
- Spanish
- Swedish
- Turkish
- Ukrainian
What happens to unsupported characters
Any character that is not supported, but is present in a source code file encoded with one of the supported encodings, is converted by CAST to an arbitrary supported character. The impact of this conversion on the analysis results depends on where the conversion occurs and on the character that results from it, so the impact is unpredictable in a general way. For example:
- If the conversion occurs only in source code comments, there is no impact on the analysis results.
- If the conversion occurs inside an identifier and the converted identifier is no longer unique as a result, resolution errors can occur.
- In CAST Imaging V3, this situation is largely avoided by the automatic UTF-8 conversion feature: source code files that are not encoded in UTF-8 are converted to UTF-8 during the Content Discovery step of the fast scan, before they are analyzed. The feature is enabled out-of-the-box, therefore the arbitrary character conversion described above will only occur for files that the feature does not process - for example files excluded by the configured file extension or character set filters, or when the feature has been explicitly disabled.
- Analysis results also depend on whether the PostgreSQL instance supports Unicode - see Encoding support below.
Code page equivalence for Unicode character sets
The language of the code page used by the operating system on the analysis node must be the same as the language used in the source code that needs to be analyzed. For example, on an operating system in Turkish you must analyze source code that is Unicode encoded for the Turkish language.
Encoding support
The following encodings are supported:
- UTF-8 without BOM
- UTF-8 with BOM
- UTF-16 with BOM
- GB 18030 (standard Chinese character set)
- BIG5 (Chinese character set for Taiwan, Hong Kong and Macau)
BOM = Byte Order Mark, an indicator at the beginning of a Unicode encoded file that specifies the order in which the bytes of a multi-byte character appear in the file (“Little Endian” vs. “Big Endian” encodings).
These encodings are supported by the components listed below.
PostgreSQL and the CAST schemas
PostgreSQL can be used to store analysis results of Unicode encoded source files provided the files use one of the encodings listed above. The Dashboard, Analysis, Management and Measurement schemas support the same encodings.
Analyzers
- C/C++
- .NET
- ASP
- Visual Basic
- Universal Analyzer/Universal Importer
- JEE Analyzer extension (including EJB, Web Services and CAST Script)
- Mainframe
- ABAP
- PL/SQL
- T-SQL
- SQL Analyzer extension
For .NET, client/server links are not resolved when the T-SQL database collation is not the same as the server collation, and the machine collation is different to the server collation.
Other components
- Architecture Studio
- The Engineering Dashboard and the other Gatekeeper dashboards
- Report Generator
- CAST logs
- CAST-ServerManager.jar
Any component that is not listed on this page may provoke an arbitrary error when analyzing or working with a Unicode encoded source code file.