Hi Nhan,
I understand that you believe the file in question to be ANSI encoded but the issue you're facing suggests that the file encoding is actually UTF-8 without BOM, which PowerBuilder will interpret as being an ANSI encoded file. This is reflected in the fact that the 3 characters you see at the beginning of the string are UTF-8 encoded left double-quote and the ending 2 characters are UTF-8 encoded right double-quote.
You can confirm this by opening the raw file in a Hex editor and look for these same characters, but more importantly look at the beginning of the file and check whether or not you see the following characters: EF BB BF indicating a UTF-8 with BOM encoded file, FF FE indicating a UTF-16LE encoded file and FE FF indicating a UTF-16BE encoded file. If you don't see EF BB BF but you do see “ and †surrounding your text in question then the file is encoded as UTF-8 without BOM.
If that is the case then you would have to read and import the file using something like following:
//Open file and convert
ll_FileHandle = FileOpen(ls_inFile, StreamMode!, FileAccessMode, FileLockMode, FileWriteMode, EncodingANSI!)
ll_rc = FileReadEx(ll_FileHandle ,lb_blob)
ls_input = String(lb_blob, EncodingUTF8!)
//Then do your ImportString()
ll_rc = dw_1.ImportString(ls_input)
I have not specified the FileAccessMode, FileLockMode or the FileWriteMode parameters (you can choose what you want as they really aren't relevant to your problem per se) but you cannot exclude them when you include the Encoding parameter.
HTH...regards,
Mark