![]() |
![]() |
To set up and use Unicode, perform the following procedure. When these conditions are met, the API registers a Unicode filespace on the server and all file names in that filespace become Unicode strings.
When you send data to previously registered, non-Unicode filespaces, the API continues to send file names as non-Unicode. Rename the old filespaces on the server to fsname_old and start a new Unicode filespace for new data. The API restores non-Unicode data from the old filespaces. Use the bIsUnicode field in the tsmQryRespFSData structure that is returned on a query filespace to determine whether or not a filespace is Unicode.
Each dsmXXX function call has a matching tsmXXX function call. The difference between the two are the structures that are used. All tsm structures have dsChar_t types for string values when they are compiled with the UNICODE flag. The dsChar_r maps to wchar. There is no other difference between these interfaces.
Some constants continue to be defined in the dsmapitd.h file, so you will need both the dsmapitd.h and the tsmapitd.h files when you compile.
You can use the TSM interface on other operating systems, such as UNIX, but on these operating systems, the dsChar_t maps to char because Unicode is supported on Windows only. You can write only one variation of the application and compile on more than one operating system using the tsm interface. If you are writing a new application, use the tsm interface. If you are upgrading an existing application:
When you enable the useUnicode flag, all string structures are treated as Unicode strings. On the server, only the following fields are true Unicode:
All remaining fields convert to mbcs in the local code page before they are sent to the server. Fields, such as nodename, are wchar strings. They must be valid in the current locale. For example, on a Japanese machine, you can back up files with Chinese names, but the node name must be a valid string in Japanese. The option file remains in the current code page. If you need to create a Unicode include-exclude list, use the inclexcl option with a file name and create a Unicode file with Unicode patterns in it. For more information, see the Tivoli Storage Manager Installing and Using the Backup-Archive Client for your operating system.