assassinator
26th May 2008, 10:52
Now I want to print Item Text in report. And Item Text maybe include Chinese. So I write the code as following:
txta.num = text.to.buf("txtn.ptr",language$,50,text.buf)
for i = buf.line to txta.num
txta.str = text.buf(1,i)
mb.import$(txta.str,txta.str)
This would call a trouble. Now the Item Text is "POLARIZER-ASN-3245RTP5700\45". After executed "mb.import$(txta.str,txta.str)", the Item Text has changed to "POLARIZER-ASN-3245RTP5700-".
I thought function mb.import$() would change the value "\45" to ASCII Code. Because the character "-" corresponding to the digital 45.
How terrible! What is the right way to solve this problem simply.
(Item Text would include Chinese or "\")
txta.num = text.to.buf("txtn.ptr",language$,50,text.buf)
for i = buf.line to txta.num
txta.str = text.buf(1,i)
mb.import$(txta.str,txta.str)
This would call a trouble. Now the Item Text is "POLARIZER-ASN-3245RTP5700\45". After executed "mb.import$(txta.str,txta.str)", the Item Text has changed to "POLARIZER-ASN-3245RTP5700-".
I thought function mb.import$() would change the value "\45" to ASCII Code. Because the character "-" corresponding to the digital 45.
How terrible! What is the right way to solve this problem simply.
(Item Text would include Chinese or "\")