|
From: Thanh N. N. <nn...@tm...> - 2004-11-02 07:31:13
|
Dear all, We can't export to text file using Unicode because when Save dialog = showing it doesn't allow us choose unicode type (utf-8). The language = used in DHIS 1.3 is VBA 6. This version of VBA doesn't support Unicode = characters. You can see in the module basComDialogs: --- Private Declare Function GetSaveFileName Lib "comdlg32.dll" Alias = "GetSaveFileNameA" (pOpenfilename As OPENFILENAME) As Long --- The problem here I think is that API functions which go with VBA 6 don't = support Unicode. There are 2 solutions for this problem.=20 1. Using ANSI character instead of Unicode (We use VNI character code = for Vietnamese. This character code is only 8 bits). 2. Finding a comdlg32.dll or GetSaveFileName API function which support = Unicode. Added comment by Ola: During implementation here in Vietnam our demand = for Wi2k/XP to have unicode support has made it difficult for us, as = most computers still run win98. If we go for solution 1 above, using the = 8 bit VNI code (same support for Vietnamese characters as unicode) it = will be easier to implement here. Then of course there is no Vietnamese = in Regional Settings, so we must do some tricks in order for the system = to pull the right strings from HISPML.mdb. We can of course use any = other language (e.g Swedish) as alias for the Vietnamese strings in = Windows settings and HISPML. Thanh tells me that VNI code is what they = use down here. =20 Regards, Ola and Thanh -----Original Message----- From: Calle Hedberg [mailto:che...@te...]=20 Sent: 31 tha=CC=81ng m=C6=B0=C6=A1=CC=80i 2004 3:37 SA To: ol...@st...; Huan Viet Tran Cc: Thanh Ngoc Nguyen; Dr. Jorn Braa; pha...@ya... Subject: Re: Unicode problem - need assistance Follow-up Ola, I have posted a question about these issues to one of the Microsoft = Access=20 news groups, but (as I expected) there's no reply - I guess to the = problem=20 is just too "special" for such newsgroups. If those sites referenced by Google do not provide further clues, I = would=20 try to contact Microsoft Vietnam, or the local company representing MS = in=20 Vietnam. Again, I'm sure others must have had the same problem and that=20 there is a solution to it. I've checked a few other things, by the way: - There are no Vietnamese version of MDAC - There are some Vietnamese related downloadable files on the MS web = site,=20 but the description is in Vietnamese (which I don't understand) and the = few=20 English words used indicate that the downloads relates to = Word/Excel/Outlook=20 and not Access. - with regard to web pages, I don't seem to have any problems displaying = Vietnamese characters using Unicode UTF-8 and Windows 1258 code page - In Word 2003, I noted that Vietnamese (see Format menu, Font, Font = Tab)=20 now is using "Latin Text Font" and not "Complex Scripts" Also note that: - I can replace B? Y t? with B=E1=BB=99 Y t=E1=BA=BF in the "File = Name" text box in the=20 Common Dialog Control that opens up to save the export file, AND it will = actually process that "vietnamese" file name correctly. For instance, I = had=20 also renamed a previous export file using the same replacement method, = and=20 the Common Dialog Control would correctly ask "A file by that name = already=20 exist, do you want to overwrite it?". BUT when I step through the code, I found that the Common Dialog Control = (via a Public Function called "DialogFile" and some other wrappers that = you=20 can find in the basComDialogs module) actually returns B? Y t? to the = string=20 variable strDataFile used in the DHIS code even when I have manually=20 replaced those question marks with the Vietnamese characters. My conclusion is that there is some fundamental "piece" missing in our=20 puzzle, since it obviously also affect the Windows Common controls=20 (MSCOMCTL.ocx and COMDLG32.dll) I don't have more time to investigate this now, and it is difficult for = me=20 since some of the available materials (as you can expect) is in = Vietnamese. Regards calle |