
Contributor
2017-04-05
12:52 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ERROR: invalid byte sequence for encoding "UTF8": 0x00
I received the following error when insert string column from mysql to Postgres.
Some of the rows were fixed when I did trim(both CHAR(0x00) from text) in my sql.
But I am still getting this error for some other rows.
Maybe it has invalid characters in the middle.
How do I get rid of them?
Some of the rows were fixed when I did trim(both CHAR(0x00) from text) in my sql.
But I am still getting this error for some other rows.
Maybe it has invalid characters in the middle.
How do I get rid of them?
1,182 Views
3 Replies

Anonymous
Not applicable
2017-04-06
11:43 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Postgesql does not supports zero in characters.
Could you please take a look at this post:http://stackoverflow.com/questions/1347646/postgres-error-on-insert-error-invalid-byte-sequence-for-...?
You can use tMap to replace " \\x00" in expression.
Best regards
Sabrina
Postgesql does not supports zero in characters.
Could you please take a look at this post:http://stackoverflow.com/questions/1347646/postgres-error-on-insert-error-invalid-byte-sequence-for-...?
You can use tMap to replace " \\x00" in expression.
Best regards
Sabrina
1,182 Views

Contributor II
2018-04-25
01:11 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I had also faced the same issue recently. As I'm working with PostgreSQL database while inserting the data from Excel (.xlsx) file.
The PostgreSQL does not support zero in characters or 0x00 (unlike Oracle). You have to replace such chars with space or anything else.
In order to do so, you have to implement an expression in tMap to handle such situations.
Use below expression:
row1.your_column_name.replace("\\x00", " ")
For reference, follow below link:
This work for me. Give it a try.
Regards
1,182 Views

Contributor
2019-09-10
01:21 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How can we handle the same issue in Talend data Mapper.
I used below function while loading the data into PostgreSQL database.
i've uploaded the regex and replace string.
Thanks,
Raghu.
Screen Shot 2019-09-10 at 11.19.39 AM.png
1,182 Views
