大网数据广告活动
安装更新与部署

Code Page Handling of Imported and Exported Tables

· 52CE 我爱测

You can add localization information to an installation database by importing and exporting ASCII text archive files using MsiDatabaseExport and MsiDatabaseImport.

You can add localization information to an installation database by importing and exporting ASCII text archive files using MsiDatabaseExport and MsiDatabaseImport. Because the database string pool uses an ANSI code page, both the database and exported Text Archive Files have code pages.

When a Text Archive File is exported from a database, the code page of the archive file is the same as the parent database. For a list of numeric code pages, see Localizing the Error and ActionText Tables.

Note:
Exporting a table to a text archive file translates the control characters to avoid conflicts with file delimiters.

ASCII Text Archive Files

The ASCII Text Archive Files exported by MsiDatabaseExport are explained in the following format:

  • The names of the table columns are written on the first line.
  • The column formats are written on the second line.
  • If the table contains only ASCII data, the third line of the text file is the table name followed by a list of the primary keys.
  • If the table contains non-ASCII data and the database is stamped with a numeric code page, the code page number appears at the beginning of the third line.
  • If the database contains non-ASCII data, but the database is not stamped with the numeric code page, the current system code page number is written at the beginning of the third line.
  • The remaining lines of the text file are the data in the specified code page.
  • If a table contains streams, MsiDatabaseExport exports each stream in the table to a separate file.

Neutral and Non-Neutral Code Pages

You can facilitate localization by starting with a database that has a neutral code page:

  • A blank database has a neutral code page.
  • A database that does not contain extended characters that require a code page to be represented in ASCII has a neutral code page.

For more information, see Creating a Database with a Neutral Code Page.

Neutral and non-neutral code pages have the following characteristics:

  • If a Text Archive File with a non-neutral code page is imported into a database that has a different non-neutral code page, the Installer returns an error when MsiDatabaseImport is called.
  • A Text Archive File that has a neutral code page can be imported into a database that has any code page.
  • A Text Archive File that has any code page can be imported into a database that has a neutral code page.
  • Importing a Text Archive File into a database with a neutral code page sets the code page of the database to the archive file code page. All archive files subsequently imported into the database must have the same code page as the first file.

For more information, see Determining an Installation Database Code Page and Setting the Code Page of a Database.

The Text Archive Files that are exported by MsiDatabaseExport can be used with version control systems. Use the Database Functions or a database table editor to edit the database.

You can add localization information to an installation database by using a database table editor or the Windows Installer API. For more information, see Code Page Handling of Parameter Strings.

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。