Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
280 views
in Technique[技术] by (71.8m points)

sql - Firebird transliteration issue: conversion from utf8 client to win1252 db server

I am facing a problem when trying to update data in a firebird database. Setup is the following:

My update statement:

           db.transaction((err, transaction) => {
        if (err) return closeDB(db, transaction, err);
        // Update one record by pk
      console.log("do update");

      const params = [];
      
        transaction.query(`UPDATE OBJEKT
        SET BEZ = 'B?ckstra?e'
        WHERE OB_KEY = 25984`, params, (err, _) => {
            // The code below is executed only when the number of parameters is less than 10
            if (err) return closeDB(db, transaction, err);
 transaction.query('select * from OBJEKT where OB_KEY = 12345', [1], (err, data) => {
                if (err) return closeDB(db, transaction, err);
                console.log(data);
                // Finally simply commit the transaction
                closeDB(db, transaction, err);
            });
        });
    });

When doing the update queries, I am receiving "Cannot transliterate character between charsets" error. When I introduce the variable with my target charset (_win1252) the update is working, but the characters are not correct: Bockstra?e ends up as: enter image description here

I started playing around with the collations, but yet no success. How can I map these 2 charsets correctly?

question from:https://stackoverflow.com/questions/65837120/firebird-transliteration-issue-conversion-from-utf8-client-to-win1252-db-server

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...