[
https://issues.apache.org/jira/browse/DERBY-7024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16729769#comment-16729769
]
Jonathan Alvarado Murillo commented on DERBY-7024:
--------------------------------------------------
Hi, [~bryanpendleton] i have opencsv, i create the csv with txt, i save it like
UTF-8, later i read the lines, when i capture the data in the variable, it is
good, like "Accounting", i make System.out.println y de out is "Accounting",
but when i make the insert, it saves like "□Accounting", but only with the
first, the CSV file doesn't have nothing on the first line, i check it.
the SYSCS_UTIL.SYSCS_IMPORT_DATA system procedure, i doesnt work to me, because
i have autonomeric fields, so when i try to import, send me an error.
this is my code
// Creación de tabla de materias.
String archivoMaterias = "C:\\TEJAM\\TBLMATERIAS.csv";
CSVReader readerMaterias = new CSVReader(new BufferedReader(new
InputStreamReader(new FileInputStream(archivoMaterias),"UTF-8")));
String[] nextLineMaterias;
while ((nextLineMaterias = readerMaterias.readNext()) != null) {
String agregarMaterias="insert into APP.TBLMATERIAS
VALUES(default,'"+nextLineMaterias[0]+"')";
this.ejecutar(agregarMaterias);
}
> Aparece el caracter □ (UNICODE 25A1) al insertar datos DB
> ---------------------------------------------------------
>
> Key: DERBY-7024
> URL: https://issues.apache.org/jira/browse/DERBY-7024
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.14.2.0
> Reporter: Jonathan Alvarado Murillo
> Priority: Major
>
> Hola, tengo datos en un archivo CSV, cuando inserto una línea como insert
> into APP.TBLMATERIAS VALUES(default,'Accounting.'), en la salida del NetBeans
> está bien, pero al momento de insertarse en la DB me escribe un caracter □
> (UNICODE 25A1), por lo tanto mi registro queda □Accounting., pero ese
> caracter no está en la captura de datos del archivo CSV ni en la salida de
> NetBeans al hacer el System.out.Print, lo curioso es que sólo lo hace con el
> primer registro, los otros registros los inserta correctamente sin ese
> caracter, esto es un error grave para mi app porque uso ese dato para una
> consulta y ejecutar una acción.
> Hello, I have data in a CSV file, when I insert a line as "insert into
> APP.TBLMATERIAS VALUES (default, 'Accounting.')", In the output of NetBeans
> it is fine, but at the moment of inserting itself into the DB it writes me a
> character □ (UNICODE 25A1), therefore my record remains "□ Accounting.", But
> that character is not in the data capture of the CSV file or in the output of
> NetBeans when doing the System.out.Print, the funny thing is that only do
> with the first record, the other records insert them correctly without that
> character, this is a serious error for my app because I use that field for a
> query and execute an action.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)