# vb6.0的BUG.....

Posted by 阿贵 on December 19, 1997 at 03:09:19:

[vb6.0专业版/Win95]....字串的值被无故改掉? 能请你帮我回答吗? 谢谢?

Dim pv_str1 As String * 2
Dim pv_str1 As String * 2
Dim pv_str3 As String * 2
Dim pv_str4 As String * 2
Mid(pv_str1, 1, 1) = Chr(&HA1C1)
Print Hex(Asc(Mid(pv_str1, 1, 1))) '**** A1C1
Mid(pv_str2, 1, 1) = Chr(&HA1A2)
Print Hex(Asc(Mid(pv_str2, 1, 1))) '**** A1A2
Mid(pv_str3, 1, 1) = Chr(&HA2A3)
Print Hex(Asc(Mid(pv_str3, 1, 1))) '**** A2A3
Mid(pv_str4, 1, 1) = Chr(&HA2A4)
Print Hex(Asc(Mid(pv_str4, 1, 1))) '**** F9F9 (Why)

'** A2A4,A2A5,A2A6,A2A7,A2CC,A2CE,A3C0~A3CF,A3D0~A3DF,
'** A3E0~A3EF,A3F0~A3FF,F9FA,F9FB,F9FC,F9FD 皆会发生给值错误
'** 这些值是因为作中文字码转换时发现(BIG5码转EUC户政役码),因
'** 为EUC码会用到上列组合,而转换后的字串传给vb6.0时,上述这些
'** 码却被莫名其妙改掉,若此问题无法解决,则将会是vb6.0字串的
'** 一大臭虫......... bug bug bug bug bug bug

Follow Ups:

- 不是 bug 小吴 16:40:16 12/21/97 (0)