Originally posted by: SystemAdmin
Re-evaluating my post, I believe it’s not applicable. I'm still trying to wrap my head around this whole concept.
The X12 country code field is 2 min and 3 max bytes in length, and I’m trying to put 6 in there, even though the visible, human readable representation is only two characters. So getting the one character would be correct.
I did do a bit of eval that I thought I would post. If anyone has worked with multi byte data and has ANY input on ANY aspect of it, I would apprecaite any information.
Using the LEFT function in WTX, where you specify the field and the number of bytes/characters from the left you want, I was wondering whether it would take the X number of characters or bytes from the left.
So going to and from a WTX defined Chinese Trad/UTF-8 fields, when I did LEFT(country code, 1), I got the first one character, equating to 3 bytes. When I did LEFT(country code, 2), I get the two characters, equating to 6 bytes.
I then decided to try a bunch of combinations, using the 6 byte/2 character country code, results in Hex:
<hr />
western to western, COUNTRY code
in
E5 8F B0 E7 81 A3
out
E5 8F B0 E7 81 A3<hr />
western/native to Chinese:
in
E5 8F B0 E7 81 A3
out
C3 A5 8F C2 B0 C3 A7 C2 81 C2 A3<hr />
Chinese to western
NO OUTPUT
<hr />
Using the left function, changing the defintion of the fields:
Chinese to Chinese:
LEFT(country code, 1) = E5 8F B0
western to Chinese
LEFT(country code, 1) = C3 A5
Chinese to Western
LEFT(country code, 1) = NO OUTPUT.
All in all, I think these are better results then I expected. When attempting to move a multi byte Chinese character with no representation in the the western code set, to a western defined field, I got no output, even when I coded "Move the 1 left most character from the Chinese string to the western defined field". It would seem the map knew the code set.
#DataExchange#IBMSterlingTransformationExtender#IBM-Websphere-Transformation-Extender