Hi! My problem is simple so I feel extremely stupid not being able to find out a solution by myself.
I'm parsing an XML file using SAX, and I need to generate a String from a char[].
If I print in the console the characters one by one, by
for (int i = start; i < start + length; i++)
{
System.out.print(ch);
}
I obtain
[[Categoria:Statunitensi]]
[[Categoria:Sport negli Stati Uniti]]
[[Categoria:Sportivi per nazionalit�|Statunitensi]]
but if I try to get the string I need, by
String tmp = new String();
for (int i = start; i < start + length; i++)
{
tmp += ch[i];
}
and then I try to print it, I obtain
[[Categoria:Statunitensi]]
[[Categoria:Sport negl
i Stati Uniti]]
[[Categoria:Sportivi per nazionalit�|Statunitensi]]
I know that a StringReader is better, but it gives the same problem. Tried with the String(char[]) constructor but the same.
A virtual beer to anyone able to solve this... thank you!!!!
Francesco