I am working with a piece of VB6 code that reads data from an instrument through the USB port.
The instrument uses an FTID USB chip and the data is read by the host byte by byte from the USB bus using a driver supplied by FTID.
Each data byte is returned as a string character and then converted using the function Asc(string).
The problem is that on Windows 10 machines running chinese, the data returned is corrupted.
I think this may have something to do with the longer (2 bytes per character instead of one) character coding used for chinese but I have not been able to understand the issue.
The issue of presenting characters in the correct format depends on how they are encoded and what font you use. The first thing you need to identify is exactly what, and what form, is the data that is being read from the chip.
Thanks for your reply. The code reads data (not text) from eeprom in the instrument. The FTDI driver (which I have no control over) returns each byte read from the USB bus as a string character.
That is why I use Asc(string) to get me the byte value that I need.
The problem, for example:
instead of reading 0 22 129 0 22
in the chinese PC I get 63 63 63 0 0
Well, the code could not be simpler. Just one line of code. The rest is done by the FTDI library routine that reads the USB data and passes it as a string. It all works fine in all systems we tested except Win10 running the chinese version.
But thank you for taking the time to comment.
Well, it is quite simple and I did explain it before but let me try again. We have an instrument connected to the host PC. The software running on the PC needs to read EEPROM data held in the instrument. It sends a command to the instrument and the instrument responds by the sending the data. The software uses the FTDI DXXX library to read and write to the USB. The data is read byte by byte. The FTDI routine returns the data as a string. The software uses the Asc() function to get the value of each byte. It all works fine except in Win10 running the chinese version.
Of course ... I have read all you have written before.
The thing what isn't clear for me is : why don't you read the data by the emulated COM-Port from the FTDI-Device ?
I have had the same problem when I wanted to read the data from a RFID-Reader (and I solved it in that way).
Just curious why my answer got down voted when it was the first one and contained the information most other answers ?? -16 points not that I really care about points after all of these years here. Just Curious Why.
Yeah but when I posted originally there were no other comments or questions showing up at the time. That's the reason I said that. Otherwise I would not have posted anything. I went thru the link from the email notification of the question so not sure if that was the reason or not that nothing else showed up. Either way I give up trying to "Help People" because of so many "Trolls" here.
There were answers showing up in the forum more than 24 hours before you posted your answer. If you couldn't see them, then you need to report that as a bug: Bugs and Suggestions[^]
You posted an answer that had already been posted more than a day previously, when the OP had already indicated that the answer did not help. It's hardly "trolling" for someone to down-vote your answer.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
Last Visit: 31-Dec-99 19:00 Last Update: 3-Dec-23 10:48