How to enable support for Unicode characters with command prompt

Yash Jain 5 Reputation points
2024-04-22T13:33:58.7+00:00

Hello Microsoft Support,

We are facing an issue when using bcp.exe command on Windows server to bulk load data to SQL Server. The BCP command is not working when the file name contains non-english characters. We wanted to enable Unicode support for command line and so we followed the below steps to change the code page in registry.

We changed the below values in registry key : HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\CodePage

ACP : 65001

MACCP : 65001

OEMCP : 65001

We are running our production application on EC2 instances on AWS. When we bake the changes to the Windows OS image, we see that Windows is not able to boot up. Attached image that shows error.

i-07c9319bf7e4ce0e8

Below is the error message

Status : 0x0000225

Info: The operating system couldn't be loaded because the NLS data is missing or contains errors.

Can you please help to share the correct set of steps we need to do in order to enable Unicode support for Command prompt.

Thanks,

Yash

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,980 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
13,221 questions
0 comments No comments
{count} vote

2 answers

Sort by: Most helpful
  1. Darrell Gorter 2,121 Reputation points
    2024-04-22T14:16:37.2333333+00:00

    Helo,

    There are some Developer blogs on this topic.

    Enter this query in your search engine to get a list:

    Unicode site:https://devblogs.microsoft.com/commandline

    Darrell

    0 comments No comments

  2. Olaf Helper 45,096 Reputation points
    2024-04-23T09:35:01.19+00:00

    "Hacking" the registry is the wrong way, and a dangerous one.

    Use the BCP parameter -C to define the codepage to use, see

    https://learn.microsoft.com/en-us/sql/tools/bcp-utility?view=sql-server-ver16


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.