Using MsSqlDataWriter to load diacritical characters

Hello,

I am trying to load a SQL Server table with text fields that contain diacritical characters such as è (e+grave accent), ö(o+umlaut), etc.

The source coude of MsSQLDataWriter.java shows that UTF-8 encoded data is sent to BCP. However BCP does not appear to support UTF-8; normal characters are fine, but diacritics show up as multiple garbage characters.

Experiments with specifying various codepages in the BCP-command were unsuccesful.

When I tweak the java-code of MsSQLDataWriter to use charset ISO-8859-1 instead of UTF-8 that works fine for me.

Is there a way to load the diacritical characters with MsSQLDataWriter without tweaking the code?

Thanks,
PaulvdB

it should be possible to specify a code page for BCP. on the wiki documentation of the MSSQl loader (http://wiki.clovergui.net/doku.php?id=c … ata_writer),
you can see the “codePageSpecifier” parameter of the component. Try to use that with a valid windows code page number.

As far as I can tell, a windows code page that is equivalent to UTF-8 does not exist.

PaulvdB.

Hi,

use the UniversalWriter to save the data into flat file and doing the code page conversion (e.g. UTF-8 into WINDOWS-1250 for Central European). After that use System Execute component to execute bcp. That will load the data (in correct encoding) into database.