vba - Character encoding in vb6 -
I have an application that stores txt, words and PDF files, then it displays the document to the user when The visual option is selected.
We use the following code to convert Unicode string into an array of bytes.
aANSISString = StrConv (VerToInsert.FileBuffer, vbFromUnicode)
The document is seen by the default application for that particular document type. Like .doc files for Microsoft Word and so on. The problem I face is when the system locale changes to "non-English", for example Arabic (code page 1256), the data is corrupted and not view-enabled. But once system locale is converted into English, everything works fine
I do not have to cope with the problem of txt files. Someone can tell me the reason or on a reference page Can indicate.
Adding a comment to Bob 77 - About Office Dev Center Document Third Parameter (LCID) :
LCID - Optional Locale ID, if system is different from locale (system locale is default.)
When you do not specify an LCID, the StrConv system relies on the locale.
You should always assign LCID to your users, different from English.
Comments
Post a Comment