得到?当 bcp 从 sybase 输出带有变音字符 (¬) 的数据时

Getting ? while bcp out data from sybase with umlaut character(¬)

我正在尝试将数据从 Sybase 导出到 .bcp 文件。在单独执行 bcp (¬) 字符时显示为“?”。有什么建议吗?

可能是您的 bcp 实用程序未使用与您的数据库或终端相同的字符集。您可能需要使用 bcp 选项来强制输出匹配您的需要。

这是标志:

[-a display_charset]
[-z language]
[-J client_charset]

SAP/Sybase ASE Utility Guide: bcp

-a display_charset

allows you to run bcp from a terminal where the character set differs from that of the machine on which bcp is running. Use -a in conjunction with -J to specify the character set translation file (.xlt file) required for the conversion. Use -a without -J only if the client character set is the same as the default character set.

-z language

is the official name of an alternate language the server uses to display bcp prompts and messages. Without the -z flag, bcp uses the server’s default language.

You can add languages to an Adaptive Server during installation or afterwards, using either the langinstall utility (or langinst in Windows) or the sp_addlanguage stored procedure.

-J client_charset

specifies the character set to use on the client. bcp uses a filter to convert input between client_charset and the Adaptive Server character set.

-J client_charset requests that Adaptive Server convert to and from client_charset, the character set used on the client.

-J with no argument sets character set conversion to NULL. No conversion takes place. Use this if the client and server use the same character set.

Omitting -J sets the character set to a default for the platform, which may not necessarily be the character set that the client is using.

有关字符集和相关标志的详细信息,请参阅 System Administration Guide