A T-SQL string literal with characters outside ASCII has no N prefix

tx0/sql:unicode-literal-without-prefixstrictwarningreliability/strings-and-regexdepth fastbug

What it finds

In SQL Server a string literal without the N prefix is converted to the database's code page, so characters outside it, such as Cyrillic or Chinese letters in a Latin database, become question marks before they reach an nvarchar column.

From the rule's source, unicode_literal_without_prefix.rs.

Turn it on, off or suppress it

The rule runs from the strict tier up. To turn it on in a lower tier, give it a level in tx0.toml:

tx0.toml
[rules]
"tx0/sql:unicode-literal-without-prefix" = "warning"

To keep one finding, suppress it with a reason: tx0 suppress ID --reason "..." writes the comment for it.

tx0 explain tx0/sql:unicode-literal-without-prefix shows the same in the terminal. Found a false positive? Report it.