I'm going to try...
Lets look at displaying 123S4n
First, I think, you will need to convert the segment definition for each character you wish to display to decimal and place it in the lookup table. For the digits this is easy because the index = the number you wish to display: For the first digit (1) the lookup index is 1, so DigDef is loaded correctly (1=1)... Same for 2 (2=2) and 3 (3=3)... Each digit you want displayed occupies the correct index, so all is fine.
Now we come to "S". What is the index of the definition of "S"? S=?? There is no numerical equivalent to S... So, I think, in order to make it work, you'll have to change your CASE statements to decode the character rather than the position like:
If your byte array contains 6 elements [0] being 1 ... [5] being "n" - from the example above, then:
FOR IDX = 0 to 5
SELECT CASE STRING[IDX] 'Return the character in position IDX
CASE 0
TEMP=0 'CHARACTER 0 is at index 0
CASE 1
TEMP=1 ' 1 is at index 1...
CASE 2
TEMP=2
CASE 4
TEMP=4
...
CASE "S" ' I think you'll need the ASCII value for "S" here
TEMP=15 ' "S" is at index 15
CASE "n"
TEMP = 17 ' "n" is at index 17
...
END SELECT
NEXT IDX
My thought, if I understand correctly, is that you will want to select the correct index based on the character rather than the position. I'm something of a noob myself and I don't know for sure that you can decode strings like I've demonstrated ("S"). You may need to use the ASCII value of the letter 83(?).
Bookmarks