• Index
  •  » Talend Open Studio for Data Integration » Suggestions
  •  » Unification of the character code when Talend studio saves routines

#1 2011-12-07 08:39:07

mohtake
New member
Registered: 2011-07-20
Posts: 6

Unification of the character code when Talend studio saves routines

Tags: [i18n, java]

Unification of the character code when Talend studio saves routines

I use Talend Studio on japanese windows XP.
Some problems occured as follows.
1)I created a routine called "testroutine1" that contains the Japanese literal string.
2)Then I added to the .ini file "-Dfile.encoding=UTF-8" in reference Bugtracker "TDI-8470".
3)And I created a new job "A" with the routine "testroutine1".
4)Job "A" didn't execute correct expected behavior.
5)I created a new routine "testroutine2" behaves the same as routine "testroutine1".
6)I changed job "A" to use "testroutine2" from  "testroutine1".
7)Job "A" successfully completed.

Differences in the two routines

Studio editor displays "testroutine2" Japanese words correctly, but "testroutine1" Japanese words are garbled.
code/routines/testroutine2_0.1.item : saved as character encoding "UTF-8". (.ini file -Dfile.encoding=UTF-8)
code/routines/testroutine1_0.1.item : saved as character encoding "MS932". (Japanese Windows default encoding)

A similar problem occurs when importing and exporting items between Studio with "-Dfile.encoding=UTF-8" and Studio without it.

I think and I ought to save routine item file in UTF-8, even the language of the whole platform OS.

Plan A)The .ini file has "-Dfile.encoding=UTF-8" in the default.
Plan B)Studio always saves .item file as character encoding "UTF-8".

Last edited by mohtake (2011-12-07 08:42:34)

Offline

#2 2011-12-09 03:08:56

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

Re: Unification of the character code when Talend studio saves routines

Hi
I do a simple test on the latest stable version TOS5 and it works,
First, I add the parameter "-Dfile.encoding=UTF-8" in .ini file.
Second, create a routine which contains japanese, I see the routine item file was saved in"UTF-8".
Third, I call the routine in the job and it print the japanese correctly.

Where do you output the japanese? Can you upload some screenshots of job?

My routine:

Code:

public class t1 {


    public static void getName() {
       
        System.out.println("きである"); 
    }
}

Best regards
Shong


Uploaded Images


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

#3 2011-12-09 07:44:21

mohtake
New member
Registered: 2011-07-20
Posts: 6

Re: Unification of the character code when Talend studio saves routines

Hi Shong
Problem does not occur in your operation.

Would you try the following steps ?
Forth,  Please remove the parameter "-Dfile.encoding=UTF-8" out from .ini file.
Fifth,  Open the routine "t1" with Studio's code editor, you can see a garbled japanese text.
Sixth, Run the job of Third Step, you can see a garbled japanese text.

Sorry, I cant upload images.

Supplement important points.
Garbled occurs when the file encoding of loading routines is different from the file encoding of saving routines.

Last edited by mohtake (2011-12-13 02:02:41)

Offline

#4 2011-12-29 02:17:30

mohtake
New member
Registered: 2011-07-20
Posts: 6

Re: Unification of the character code when Talend studio saves routines

This problem occurs even though the items including rutines in the Studio between two different ini file with the export/import.
If you define "-Dfile.encoding=UTF-8" on the other hand, not defined in the other, are or vice versa.

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Suggestions
  •  » Unification of the character code when Talend studio saves routines

Board footer

Powered by FluxBB