1 Reply Latest reply on Jul 1, 2013 11:36 AM by Kyan Skeem

    Extract API error measuring utf8 to utf16

    Kyan Skeem

      Hello,

       

      I'm trying to export a TDE of ~575 rows of ~20 columns using the Java Extract API. On a smaller data set, the export process works fine, but on this larger set, the TDE does not seem to be complete. I don't get any exceptions, but the DataExtract.log file has an error:

      InsertPutValues: insert_guid=1 n_values=4120 FAILED, error=error measuring utf8 to utf16


      Also, the tde is ~30k in size, which is smaller than the smaller TDE I exported earlier. Any thoughts on what might be going on?

        • 1. Re: Extract API error measuring utf8 to utf16
          Kyan Skeem

          It turns out that you have to convert you strings to UTF-8 prior to calling the Row.setCharString method. Use something like:

              String utf8Value = new String(value.getBytes(Charset.defaultCharset()), "UTF-8");

           

          That should fix the problem.  This really should be done for you in the SDK, or at minimum have it documented properly. Many JVMs on windows won't default to UTF-8.

          2 of 2 people found this helpful