INF: SQL Server Tools Save Files in OEM Format

Last reviewed: April 9, 1997
Article ID: Q155233
The information in this article applies to:
  • Microsoft SQL Server, version 6.5

SUMMARY

The Microsoft SQL Server utilities such as ISQL/w, ISQL, and the query analyzer window in the SQL Enterprise Manager save their files using the OEM code page.

MORE INFORMATION

When you run the Save or Open commands from the File menu in the ISQL/w utility or the query analyzer window of the SQL Enterprise Manager, or if you use the /i or /o switches for the ISQL command line utility, the tools will create or read the files using an OEM code page (the default OEM code page in Windows NT is the DOS 437 code page). Windows utilities assume the files they work with were created using the Windows ANSI code page (code page 1252). For additional information about code pages, please see the SQL Server Setup Guide and the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q153449
   TITLE     : INF: SQL Server Code Pages and AutoANSItoOEM Behavior

Because the SQL tools work with a different code page than other windows utilities, extended characters (those characters represented by numbers greater than a decimal 128) will not display correctly if the files are opened in a utility of the other type. For example, if you run a script in ISQL/w and save the output as a .RPT file, then open that .RPT file in Notepad, extended characters will display as characters from the other code page. If you create a file in Notepad and save it as a .SQL file and then open that .SQL file in ISQL/w, once again, any extended characters will be interpreted as the other characters. This does not apply to the standard alphabetic A-Z characters, numeric 0-9 characters, or special characters (such as @, #, $, and so forth). These are constant from one code page to another, and so always display the same character. The characters affected are the extended characters, such as German umlaut's (ö). As an example, if you type the Spanish character Ñ in ISQL/w and the click Save from the File menu, it will be saved as OEM code 0xA5 (or decimal 165). If you then open the file in Notepad, Notepad will interpret the 0xA5 as the ANSI character for the yen sign, ¥.

The characters will be constant if you use a Windows utility that can treat a file as a DOS OEM file. For example, the Wordpad utility of Windows NT 4.0 and Windows 95 can open or save files as 'DOS Format Text Files'. These files can successfully interoperate with the SQL Server tools.


Additional query words:
Keywords : kbnetwork SSrvISQL
Version : 6.5.201
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 9, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.