In short, the problems were actually two:
1st) newline characters inside the $data content that made the $data to be truncated. This can be solved by extracting newline chars;
2nd) size limit. The content passed to characterData callback function is truncated to around 1,000 characters. That´s the problem. Does anyone know where this limit is set and how to work around this?