Opening unicode files, Surrogate support, Converting unicode to ucn – Slick EDIT V3.3 User Manual

Page 494: Unicode limitations

Advertising
background image

sion-specific or global encoding. Since there is no option for recognizing UTF-8 or UTF-32 files (other
than Auto XML) by looking at the file contents, you will either need to set an extension-specific encoding,
or specify the encoding in the Open dialog the first time you open the file.

Some compilers (such as Visual C++) let you specify the code page in the source file (in fact, more than
one code page can be used in the file). This is not supported, so the assumption is that the file is SBCS/
DBCS active code page data.

Opening Unicode Files

To open a Unicode file, complete the following steps:

1. Use the Open dialog (File

Open).

2. Specify the encoding if necessary.

3. Press Enter.

Surrogate Support

Unicode data is stored as UTF-8 and not UTF-16. Since the Windows Win32 calls are used to implement
some Unicode features there are some issues. By default, Windows does not support surrogates. You
must use the regedit program to turn on surrogate support.

To turn on surrogate support, run the regedit program and go to the following key location:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\LanguagePack

Set the value for SURROGATE to 0x00000002.

Casing features (uppercase, lowercase, ignore case) do not support surrogates. Windows is used for cas-
ing support and Windows casing features do not support surrogates.

Converting Unicode to UCN

You can convert a selection from Unicode to UCN or vice-versa. SlickEdit

®

Core conversion features are

located on the Edit

Other menu. The Unicode to UCN conversion feature is most useful for specifying

Unicode character strings in SBCS/DBCS active code page source files. For example, here are the steps
to store some UCN in a Java source file:

1. Open the Unicode file containing the Unicode characters or create a new Unicode file and enter the

characters you want to convert.

2. Select the Unicode characters you want to convert.

3. Execute the Java/C# (UTF-16 \uHHHH) menu item (Edit

Other

Copy Unicode As).

4. Open the Java source file and paste (Edit

Paste) the UCN data into the file.

Unicode Limitations

Using Unicode

472

Advertising