# Using MsSqlDataWriter to load diacritical characters

**URL:** <https://forum.cloverdx.com/t/using-mssqldatawriter-to-load-diacritical-characters/320>\
**Category:** CloverDX Platform\
**Created:** [May 22, 2008, 12:00am UTC](https://forum.cloverdx.com/t/using-mssqldatawriter-to-load-diacritical-characters/320 "2008-05-22T00:00:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![paulvdb](https://avatars.discourse-cdn.com/v4/letter/p/8c91f0/32.png) [@paulvdb](https://forum.cloverdx.com/u/paulvdb)\
**Post date:** [May 22, 2008, 12:00am UTC](https://forum.cloverdx.com/t/using-mssqldatawriter-to-load-diacritical-characters/320/1 "2008-05-22T00:00:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jurban](https://avatars.discourse-cdn.com/v4/letter/j/cc9497/32.png) [@jurban](https://forum.cloverdx.com/u/jurban)\
**Post date:** [May 22, 2008, 12:51pm UTC](https://forum.cloverdx.com/t/using-mssqldatawriter-to-load-diacritical-characters/320/2 "2008-05-22T12:51:26Z")

</div>

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](http://wiki.clovergui.net/doku.php?id=components:bulkloaders:mssql%5Fdata%5Fwriter)),  
you can see the “codePageSpecifier” parameter of the component. Try to use that with a valid windows code page number.

---

<div class="post-metadata">

**Author:** ![paulvdb](https://avatars.discourse-cdn.com/v4/letter/p/8c91f0/32.png) [@paulvdb](https://forum.cloverdx.com/u/paulvdb)\
**Post date:** [May 22, 2008, 1:30pm UTC](https://forum.cloverdx.com/t/using-mssqldatawriter-to-load-diacritical-characters/320/3 "2008-05-22T13:30:06Z")

</div>

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

PaulvdB.

---

<div class="post-metadata">

**Author:** ![misho](https://avatars.discourse-cdn.com/v4/letter/m/8c91f0/32.png) [@misho](https://forum.cloverdx.com/u/misho)\
**Post date:** [February 7, 2009, 5:21pm UTC](https://forum.cloverdx.com/t/using-mssqldatawriter-to-load-diacritical-characters/320/4 "2009-02-07T17:21:56Z")

</div>

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.
