Or simpler, I have this code (Oracle database)
SELECT TO_NUMBER (tkb.id_kucnog_broja) id, 'Buildings and home numbers' vrsta_pj,
and in Java I have this
for (int j = 0; j < rs.getMetaData().getColumnCount(); j++) {
data = rs.getString(j + 1);
}
and the result it gets is 'Buildings and home number', meaning it 'cuts' the last char (same thing if I change the string). I can make the string with 2 's' chars, but I'd really like to know why does this happen.
EDIT:
Managed to pinpoint the problem. The real string is 'Zgrade i kućni brojevi' (I've translated it here) and it seems the sign 'ć' (and i'm guessing any other like 'š' or 'đ') is(are) the problem. If I write any sized string (didn't experiment too much, got a lot of work :) ) and don't put in croatian 'special' signs, everything is ok, but the moment I put it in, the string gets shortened by one char. What's specially interesting is that it works just fine when I execute it in Toad.
EDIT2: Seems croatian special chars take 2 places. If I put '\u107' the problem remains. I can make a workaround (write 'ć'
or add any string at the end of this one) so the problem is solved (in a way that I know how to get the job done) but I'm still curious how to do it properly.