please IOCTL to convert CODE.PAGE, the sample codes is below:

$INSERT jbc.h
    Y.CODE.PAGE ="utf8"
    Y.PATH = "SAM.BP"
    Y.FILE.NAME = "LOCAL.TABLE.LIST"
    X.R.CRLF = CHARX(013):CHARX(010)
    Y.FILE.POINT = ""
    OPENSEQ Y.PATH,Y.FILE.NAME TO Y.FILE.POINT ELSE
        CREATE Y.FILE.POINT ELSE
            RETURN
        END
    END

     FN.LT = 'F.LOCAL.TABLE'
     F.LT = ""
     CALL OPF(FN.LT, F.LT)
     YLT.LIST = ""
     SEL.CMD = "SELECT " : FN.LT
     CALL EB.READLIST(SEL.CMD,SEL.LIST,'',NO.OF.REC,SEL.ERR)
     LOOP
         REMOVE XLT.ID  FROM SEL.LIST SETTING YPOS
     WHILE XLT.ID:YPOS
         CALL F.READ(FN.LT, XLT.ID, R.LT, F.LT, ER1)
         YLT.LIST<-1> = X.R.CRLF : XLT.ID : "=" : CHANGE(R.LT<1>,VM," ")
     REPEAT

    IF IOCTL(Y.FILE.POINT,JIOCTL_COMMAND_SETCODEPAGE,Y.CODE.PAGE) ELSE
        RETURN
    END

     WRITESEQ YLT.LIST TO Y.FILE.POINT ELSE
        RETURN
    END




2010/10/1, Jim Idle <[email protected]>:
> Have you set the environment variables at the jBASE end such that it has
> been told to emit values as UTF8 and to expect UTF8 when reading files etc?
> jBASE uses UTF8 internally when localization is turned on, so you should not
> need to convert anything. Your problem might be that some of the characters
> are outside the range of Java's UTF8 encoding.
>
> Anyway, this is basically you not configuring jBASE to use UTF8 I think -
> did you read the internationalization manual on the web site.
>
> Jim
>
>> -----Original Message-----
>> From: [email protected] [mailto:[email protected]] On
>> Behalf Of ankit
>> Sent: Thursday, September 30, 2010 5:36 PM
>> To: jBASE
>> Subject: T24:Unicode Problem
>>
>> Hi All,
>>
>> I am developing a solution for one of the clients in China. I am reading
> some
>> values from t24 database and passing it to a java program. Now when I
> write
>> the received string from t24 to a file the characters appear as "????". I
> know
>> java can convert Unicode characters to UTF-8. But in this case it does not
>> seem to work, because when the characters are passed to the java program
>> from jbase routine they are already corrupted. Any solution for this
>> problem?
>>
>> Thank You,
>> Ankit.
>>
>> --
>> Please read the posting guidelines at:
>> http://groups.google.com/group/jBASE/web/Posting%20Guidelines
>>
>> IMPORTANT: Type T24: at the start of the subject line for questions
> specific
>> to Globus/T24
>>
>> To post, send email to [email protected] To unsubscribe, send email
>> to [email protected]
>> For more options, visit this group at
>> http://groups.google.com/group/jBASE?hl=en
>
> --
> Please read the posting guidelines at:
> http://groups.google.com/group/jBASE/web/Posting%20Guidelines
>
> IMPORTANT: Type T24: at the start of the subject line for questions specific
> to Globus/T24
>
> To post, send email to [email protected]
> To unsubscribe, send email to [email protected]
> For more options, visit this group at
> http://groups.google.com/group/jBASE?hl=en
>

-- 
Please read the posting guidelines at: 
http://groups.google.com/group/jBASE/web/Posting%20Guidelines

IMPORTANT: Type T24: at the start of the subject line for questions specific to 
Globus/T24

To post, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

Reply via email to