Closed RobertPrediger closed 6 years ago
Hello Robert,
Seems data in your json has non utf-8 characters.
You should convert it manually to utf-8 or use iconv to do it, before you use it with node-jasper.
Hope it helps.
But this happens only, if I put a data: {} inside.
This is fine (but creating an empty pdf-file):
var report = jasper.pdf( {
report: repName,
dataset: data
} );
This one is producing this error:
var report = jasper.pdf( {
report: repName,
data: {},
dataset: data
} );
Now I have it. You have problems with converting data to Java.
If you take your example and put a German umlaut inside (in utf-8 format, example "ä"), than you'll get this error.
How can ve avoid this?
Hi Robert, that's weird... could you give me a full example so I can run it and see what's wrong?
Thanks.
El lun., 30 de marzo de 2015 a las 16:09, Robert Prediger (< notifications@github.com>) escribió:
Now I have it. You have problems with converting data to Java.
If you take your example and put a German umlaut inside (in utf-8 format, example "ä"), than you'll get this error.
How can ve avoid this?
— Reply to this email directly or view it on GitHub https://github.com/agmoyano/node-jasper/issues/6#issuecomment-87794552.
Hi,
just simply add an "ä" in one of the strings in data in your example. This should produce this error.
Thanks!
Best regards Robert
Just use this:
[{
name: 'Gonzalo',
lastname: 'Vinasä' // here is an umlaut
}, {
name: 'Agustin',
lastname: 'Moyano'
}]
Hi,
I think the problem continues when using ToJsonDataSource method, cause you changed just the processConn method but not toJsonDataSource method, which is using the old code and giving the same error with UTF-8.
I would really appreciate if you can change this. Really thanks in advance for the plugin !!! :)
BR.
Hi,
This works! (commented the old part and using the same as processConn)
I cannot pull the project in order to do a Pull Request because from my Git Client I just can pull organization projects... :( Sorry.
Thanks in advance !!
I have a report definition with 'in_memory_json'. After calling, I get this error:
What can I do to avoid this behaviour? If you need more info, tell me. ;)
Thanks Robert