Author |
Message
|
MasterMind |
Posted: Tue Nov 09, 2010 9:07 am Post subject: Chinese characters into CSV File |
|
|
Newbie
Joined: 09 Nov 2010 Posts: 9
|
Guys,
I was trying to push in few attributes from xmls in to a csv file, I am using MRM domain to generate the resultant structure.
Certain attributes in the xml has Chinese characters (Like name , Desc etc ) which are not getting passed into CSV file asis, instead i am able to see the corresponding charactered in ANSI encoding.
I am setting the OutputRoot CCSID as 1208, but its not helping.
Do you see any alternatives where i can push the Chinese characters as is into the CSV file. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Nov 09, 2010 11:01 am Post subject: Re: Chinese characters into CSV File |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
MasterMind wrote: |
Guys,
I was trying to push in few attributes from xmls in to a csv file, I am using MRM domain to generate the resultant structure.
Certain attributes in the xml has Chinese characters (Like name , Desc etc ) which are not getting passed into CSV file asis, instead i am able to see the corresponding charactered in ANSI encoding.
I am setting the OutputRoot CCSID as 1208, but its not helping.
Do you see any alternatives where i can push the Chinese characters as is into the CSV file. |
You mean to say that you are doing:
Code: |
SET OutputRoot.Properties.CodedCharSetId =1208; |
?
Also make sure that the file utility you use handles UTF-8 display or check the hex values in the file.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
kimbert |
Posted: Tue Nov 09, 2010 11:05 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
There is no reason why this should not work. As Vitor says, check the actual bytes in your output. If it still looks wrong, please take a user trace and look for messages about the setting of the CCSID. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Nov 09, 2010 11:26 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
kimbert wrote: |
As Vitor says, check the actual bytes in your output. |
It's normally me saying that, but in this instance I can't claim credit.
 _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
MasterMind |
Posted: Wed Nov 10, 2010 2:05 am Post subject: |
|
|
Newbie
Joined: 09 Nov 2010 Posts: 9
|
Intrestingly.....
I am able to get the required info into a .doc or .txt file with out data (Chinese characters) getting corrupted/converted, but its not the case with CSV file. The chinese characters are getting converted into corresponding ASCII characters.
If i rename the generated .csv file to .doc , it displys all the chinese characters properly.
Looks more like an issue with excel , may be a patch or some language settings are required to enable excel to display chinese characters.
Any body faced similar issue with csv/ excel file diaplaying chinese ?
- MM |
|
Back to top |
|
 |
kimbert |
Posted: Thu Nov 11, 2010 1:51 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
I am able to get the required info into a .doc or .txt file with out data (Chinese characters) getting corrupted/converted, but its not the case with CSV file. |
That proves that the output from message broker is OK. The problem is with the application that is viewing the output.
Quote: |
The chinese characters are getting converted into corresponding ASCII characters. |
That's not quite true. The chinese characters are getting displayed incorrectly. That may sound picky, but if you don't think accurately about the problem you will never solve it. |
|
Back to top |
|
 |
MasterMind |
Posted: Fri Nov 12, 2010 9:37 am Post subject: |
|
|
Newbie
Joined: 09 Nov 2010 Posts: 9
|
kimbert, MS word is able to identify and convert to the required language when a corresponding language is selected (You get a list of options to choose the encoding/ supporting language) after which word will be able to open the file and display all the characters in Chinese.
Similarly an advanced editor like notepad++ will also be able to display the Chinese characters when the language pack is installed.
This is not the case with excel as it never asks for any options before opening the file, what i assume is since its not identifying the characters its displaying them in ascii (the default encoding).
What do you think abt this ?
- MM |
|
Back to top |
|
 |
Vitor |
Posted: Fri Nov 12, 2010 10:48 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
MasterMind wrote: |
What do you think abt this ? |
I think Excel has less non-standard character support than Word or Notepad ++, which you could understand given that the others are principally concerened with language but Excel's strength (if that's the term I'm looking for) is numbers.
I also think this has moved from a WMB issue to an Excel issue, and you might gain more assistance from an Excel forum than this one. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
MasterMind |
Posted: Fri Nov 12, 2010 10:50 am Post subject: |
|
|
Newbie
Joined: 09 Nov 2010 Posts: 9
|
I believe so... will surely post the solution once i resolve it.
Thanks for the support. |
|
Back to top |
|
 |
Untomato |
Posted: Wed Nov 17, 2010 8:21 pm Post subject: |
|
|
Newbie
Joined: 17 Nov 2010 Posts: 4
|
Try openning the csv file using File -> Open.. inside Excel instead of double clicking the csv file directly. You can then choose the character set Excel uses to read the file. |
|
Back to top |
|
 |
|