Try setting yourLANG variable before executing your program.

export LANG=iso885915

This is a Linux only problem with UOJ. It is the same for java apps and
servlets.


On Mon, 2008-06-02 at 16:17 -0700, waivic wrote:

> I have a very simple file-TESTS, which only has 4 fields:  @ID field, F1, F2
> and F3. F1 is a single value field, F2 is a multi-value field and the value
> is one value-mark-separated list, F3 is a single value field. It has the
> following sample record in the file:
> 
> Field Name          Value
> @ID                   t101
> F1                     F1V1
> F2                     F2V1:@VM:F2V2
> F3                     F3V1
> 
> I use the following UniObject for Java code segment to retrieve the record
> "t101" from the file:
> 
> //uSession is a UniSession Oject       
> uSession.connect();
> 
> //Open a file variable to TESTS file.
>  UniFile testFile = uSession.open("TESTS");
>          
> //Read the record out 
> String key = "t101";
> UniStirng uString = personFile.read(key);
> System.out.println(bthe full record:b+uString);
> System.out.println(bthe number of fields in the file:b+uString.dcount());
> 
> 
> When I print out the contents of the record, it looks like UOJ converts all
> the value marks at the field F2 into the field mark.  When I use dcount()
> function to count the number of fields in the output, it returns 5, instead
> of 4.  I think the correct result should be 4 since only 4 fields (@ID
> field, F1, F2 and F3) in the file. It seems that read() function converts
> all the value-marks into the field-marks. So the values at the field-F2:
> F2V1:@VM:F2V2 becomes F2:@FM:F2V2. That is why I got 5 instead of 4 when we
> use dcount() to count the number of fields in the output. 
> 
> We are running Unidata 7.1 in Red hat Linux server.  I already set the
> environment variable LANG to bCb. I even tried to set LANG to ben_USb. 
> Both
> times, the UOJ program returned the same result.
> 
> Does anyone know how this happens? I want to keep the original value-marks
> and field-marks after using read() function. Please advice. 
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to