Hello, I have a central db (UCA , UTF-8 , sybase 126.96.36.19960) and remote db’s (same set-up). In this database I store brands , CREATE TABLE "icat"."Brand" ( "BrandID" NUMERIC(16,0) NOT NULL, "Name" NVARCHAR(50) NOT NULL PRIMARY KEY ( "BrandID" ASC ) ) when I add a new brand that contains cyrillic (“трудно”) this has no problem replicating to one of my remote db’s. The statements looks like INSERT INTO icat.Brand(BrandID, Name) VALUES (1000003637,TO_NCHAR(0xD0A2D0A0D0A3D094D09DD09E,'UTF-8')
Mind the TO_NCHAR and the fact that the name field is NVARCHAR.
However , when I create a new remote DB and I run the sql remote to generate the replication files and read these at the remote db, the “трудно” turns into some other even weirder characters (squares and what not). If I then update the name in the central and run the replication it will be correct, using the to_nchar in the update statement.
Anyone have a clue as to why the initial load of data is handled different from later updates in inserts?
Kind regards Dimitri
Adding the charSet= utf-8 connection parameter to the dbremote command seems to fix everything.
"C:\Program Files (x86)\SQL Anywhere 11\BIN32\dbremote.exe" -c "eng=icat9636;dbn=icat9636;CharSet=utf-8" -b -qc -r -os 50M -o "d:\applicationdata\ICAT\Sync\SqlRemoteLogs\icatcentral\dbremote_messages.log" -l 100000 -t -v "D:\Databases\Sybase\icat\icatlocal"