------ Original Message ------

On 26/07/01, 12:53:50, Wim Demeulenaere <[EMAIL PROTECTED]> wrote 
regarding [OCF] Problems with format ATR string:


> Hello everybody,

> I Try to run a demo application I found in the OCF manual but I have some
> trouble.
> I'm using the package "com.ibm.opencard.terminal.pcsc10" and for the ATR
> string they use a byte[].  When the higher nibble of a byte of my ATR 
string
> is higher then 7, I get garbage.  I think because of the fact that the 
last
> bit is used for the sign ?

> For example : ATR = 3b 2a 00 80 .....
> Becomes : 0x3b 0x2a 0x00 0xffffff80 ...

> Can somebody help me ?

ATRs are not strings. They are byte[]. i.e. Byte[] { 0x00, 0x00, 0x00, 
0x00... } is potentially a valid ATR but is not a human-readable string.

A a result there is no standard text encoding for ATRs.

You should just write your own function that writes out chars 32-127 and 
puts "?" if it is outside this range.

Nothing else really makes sense. You should deal with the byte[] values 
anyway.

Cheers



---
> Visit the OpenCard web site at http://www.opencard.org/ for more
> information on OpenCard---binaries, source code, documents.
> This list is being archived at http://www.opencard.org/archive/opencard/

! To unsubscribe from the [EMAIL PROTECTED] mailing list send an email
! to
!                           [EMAIL PROTECTED]
! containing the word
!                           unsubscribe
! in the body.

Reply via email to