Hello,

A real thanks guy: you are doing a great job.


I found in lsc-sample, that the test for UTF-8 into .csv file to import to hsqldb is failing because it is too restrictive: it takes the second field of the

  file input.csv

command. This command makes three tests and may give more than one answer.

On my csv, onto Debian 7 with file, version 5.11 it returns:


  ../input.csv: C source, UTF-8 Unicode text


The lsc-sample scripts does a "file" commands and takes the second field with the blank as a separator, which fails here.


If the line searches for a substring of "UTF-8" anywhere on the line this might work a little better like in:


diff lsc-sample lsc-sample-new
125,126c125,126
<            encoding=`file $1  2> /dev/null | cut -d' ' -f2`
<            if [ "x$encoding" == "xUTF-8" ] ; then
---
                encoding=`file $1`
                if [ "$encoding" != "${encoding%UTF-8*}" ] ; then


...and indeed it works better now for me.


Cheers.


François
_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org

lsc-users mailing list
[email protected]
http://lists.lsc-project.org/listinfo/lsc-users

Reply via email to