Is there any function for converting single to double byte
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 21
- Joined: Wed Aug 29, 2007 1:33 am
- Location: Bangalore
- Contact:
Is there any function for converting single to double byte
Hi All,
I need to convert the Japanese characters Half Kana (Single Byte) to Full kana (Double Byte). My target is DB2. Is there any specific function in DataStage Server job to do this conversion???
Thanks in Advance
Regards
Rudresh
I need to convert the Japanese characters Half Kana (Single Byte) to Full kana (Double Byte). My target is DB2. Is there any specific function in DataStage Server job to do this conversion???
Thanks in Advance
Regards
Rudresh
Rudresh Eswarappa
If you have NLS enabled then you can have DS do this automatically by defining the appropriate and correct mappings. Which Half-Kana representation are you using? (Don't some or many character sets actually have both representations defined? I seem to remember being able to choose representations when using IME)
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
What map is your single-byte kana? And what map is the multibyte one supposed to be?
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 21
- Joined: Wed Aug 29, 2007 1:33 am
- Location: Bangalore
- Contact:
Hi again,
Suppose I have a column with 5 japanese characters with Single byte kana (Katakana). That should be converted to 10 Japanese characters with double byte kana. I am not sure how it can be done in DataStage since there is no conversion function like that.
Can anyone help me out on this issue.
Thanks in Advance.
Regards
Rudresh
Suppose I have a column with 5 japanese characters with Single byte kana (Katakana). That should be converted to 10 Japanese characters with double byte kana. I am not sure how it can be done in DataStage since there is no conversion function like that.
Can anyone help me out on this issue.
Thanks in Advance.
Regards
Rudresh
Rudresh Eswarappa
-
- Participant
- Posts: 21
- Joined: Wed Aug 29, 2007 1:33 am
- Location: Bangalore
- Contact:
How about answering the questions first? If you wish to convert from single-byte to double-byte representations within the same character set you will need to use the CONVERT function.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
I disagree. Five characters encoded using any SBCS (single-byte character set) will - can - only generate five characters if encoded using a compatible DBCS (double-byte character set). It will take up twice as many bytes, typically, but will only be five characters.RudreshEswarappa wrote:Hi again,
Suppose I have a column with 5 japanese characters with Single byte kana (Katakana). That should be converted to 10 Japanese characters with double byte kana. I am not sure how it can be done in DataStage since there is no conversion function like that.
Can anyone help me out on this issue.
Thanks in Advance.
Regards
Rudresh
Therefore, as Arnd indicated, you need to be aware of which SBCS - what you are calling "single byte kana" - is being used to encode these characters, then find an appropriate DBCS for encoding the same characters. There are many encodings available for Japanese characters, one of the most common being SHIFT-JIS (and even that has variations).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Common character sets, i.e. Shift-JIS, have both single and double byte representations of the kana characters. If you want to do this type of conversion it is a simple string manipulation; if you wish to change representations then you have an NLS issue.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 21
- Joined: Wed Aug 29, 2007 1:33 am
- Location: Bangalore
- Contact:
What have you tried and what was the result? Specifically, what method did you use to convert a SBCS representation of a kana "ha" to a DBCS kana "ha"? Which encoding are you using?
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>