0

I am using debezium 1.5.0.Beta1 sqlserver connector with SQL Server 2019 and Kafka to capture CDC on my database. I have a problem with NCHAR and NVARCHAR values from database. In my table I have values:
NCHAR -> N'あ' and NVARCHAR -> N'こんにちは', and that is fine in database. But when I run debezium connector, it create event with string values of those two fields with values:
"Ńüé" and "ŃüôŃéôŃüźŃüíŃü»".
Is there any why I can decode it back to あ and こんにちは?

  • 1
    It's a [mojibake](https://en.wikipedia.org/wiki/Mojibake) case as in Python's `'こんにちは'.encode( 'utf-8').decode( 'cp775')` returns `'ŃüōŃéōŃü½ŃüĪŃü»'`. You _could_ reverse it as `'ŃüōŃéōŃü½ŃüĪŃü»'.encode( 'cp775').decode( 'utf-8')` (returns `'こんにちは'`) however fix it in your connector rather… – JosefZ Mar 16 '21 at 10:56
  • @JosefZ Thank you so much sir, that solved a problem. – salapura.stefan Mar 16 '21 at 11:32

0 Answers0