L
LeeHiOoO
Guest
Hey guys, I'm trying to write a program (FF related - I'm not getting into details) and I've been trying so many ways to decode FF texts to ASC. I had success in decoding FF text to ASC but I can't seem to decode ASC back to FF text. There are so many issues... I'm wondering if someone can enlighten this.
Here's basically what my code does:
This one works FF to ASC ...
Code: [Select]
but i haven't come with a way to encode back to FF'ish' text
Tried this one recently but didn't worked:
Code: [Select]
:-( Can someone explain the method that u guys did in ur progs?
Here's basically what my code does:
This one works FF to ASC ...
Code: [Select]
Code:
'tmpbytes() as byte array that already read through the fileFor i = 0 To tmpbytes.Length - 1 sTmp &= FF2ASC(tmpbytes(i)) NextPrivate Function FF2ASC(ByVal b As Byte) As String Select Case Hex(b) Case "0" Return Environment.NewLine & "[END DIALOG]" & Environment.NewLine Case "1" Return Environment.NewLine & "[NEW WINDOW]" & Environment.NewLine Case "2" Return Environment.NewLine Case "20" Return " " Case "21" Return "0" Case "22" Return "1" Case ....
Tried this one recently but didn't worked:
Code: [Select]
Code:
'These tables are type string() defined at form load .... FF_table(65) = "21" FF_table(66) = "22" FF_table(67) = "23" FF_table(68) = "24" FF_table(69) = "25" FF_table(70) = "26" FF_table(71) = "27" .... ASC_table(65) = "0" ASC_table(66) = "1" ASC_table(67) = "2" ASC_table(68) = "3" ASC_table(69) = "4" ASC_table(70) = "5" ASC_table(71) = "6" ....'then it comes the functionPrivate Function Encoding(ByVal str As String, ByVal Method As String) As String Select Case Method Case "FF" For i = 0 To FF_table.Length - 1 str = str.Replace(ASC_table(i), FF_table(i)) Next Return str Case "ASC" For i = 0 To FF_table.Length - 1 str = str.Replace(FF_table(i), ASC_table(i)) Next Return str End Select End Function
Last edited: