• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Wrong character encoding in mysql result using characterSetResults prp

#1 2011-05-29 20:30:58

jackoob
New member
Company: Atollon Consulting
Registered: 2011-04-19
Posts: 3

Wrong character encoding in mysql result using characterSetResults prp

Hi,

I've problem with tMysqlConnection. Data in the databse are stored in latin1 so I need to set up jdbc connector to use this character set. Unfortunately setting up tMysqlConnection Additional JDBC Parameters to "characterSetResults=CP1252" (latin1, iso8859_1) does not affect output.

When I connect on the server and use following connection command everything goes right:

Code:

mysql -p pc --default-character-set=latin1
mysql> select last_name from candidate where candidate_id=3;
+-------------+
| last_name   |
+-------------+
| Kovářová |

Same when I'm connecting with MySQL workbench:

Code:

SET character_set_results = latin1;
SELECT last_name  FROM `pc`.`candidate` where candidate_id=3;

Is there a way to run "SET character_set_results = latin1"; command before any future select? Or is there way to make connection right?

Offline

#2 2011-05-30 02:43:12

shong
Talend team
Registered: 2007-08-29
Posts: 10351
Website

Re: Wrong character encoding in mysql result using characterSetResults prp

Hi
1. Append this parameter useUnicode=true&characterEncoding=xxx into tMysqlConnection Additional JDBC Parameters.
or
2. Use a tMysqlRow to execute statement ""SET character_set_results = xxx" before any future select, eg:
tMysqlConnnection
     |
onsubjobok
     |
tMysqlRow
     |
onsubjobok
     |
tMysqlInput--main-->tLogRow
     |
onsubjobok
     |
tMysqlCommit
on tMysqlRow, check the box' use an existing connection'

Best regards
Shong


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Wrong character encoding in mysql result using characterSetResults prp

Board footer

Powered by FluxBB