Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Implementing unicode im Mercator 7.5 for flat files

Status
Not open for further replies.

rommel78

Programmer
Nov 8, 2004
4
IN
I am trying to implement utf-8 for flat files. My inputs can be a combination of text and utf-8 characters. All fields are of fixed length format. The major problem is , if I have a field of length 7 and my input field looks like this,

vikr?m?
This contains 9 bytes. But on output I wud get only this because I have a field length of only 7 even though I am giving an input of only 7 characters.

vikr?m

The ? gets truncated. I need to get my output exactly as the input. But I cannot increase the field length , because it would affect the offset positions of the other fields. Is there a way to get around this.
 
vikr?m? only seems to have 7 bytes.
1234567 If you need to handle double byte characters, you need the Japanese version, and this only supports kanji etc.

Are you defining the text items as UTF-* or native or what?



BocaBurger
<===========================||////////////////|0
The pen is mightier than the sword, but the sword hurts more!
 
I am using utf-8 data language on both the input and output typetrees. But on the output side mercator recogonizes the input in terms of bytes and not as characters independent of the character set, though in Mercator 7.5 it is supposed to handle it as characters. I was able to come up with a solution where I insert this command for a field where I want to capture the data field length 4 and in the event of no data, I am giving it a padding of 4 characters, so that the offset positions of other fields do not get affected.

=FILLRIGHT( LEFT(testfield Field:Testinput, 4) ," ", 4)

But I have to do this for every field which requires a lot of effort. I am now trying to see if I can do it in an easier way preferably in the typetrees and avoid touching the map rules.
 
Open an issue with support. This could be a bug, and we need to fix it if it is.

When you open the issue, let me know the Scase # so I can track it.



BocaBurger
<===========================||////////////////|0
The pen is mightier than the sword, but the sword hurts more!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top