|
From: Calle H. <che...@te...> - 2004-11-02 08:30:43
|
Hi,
Good work, guys! I had started to suspect that there was some fundamental=
=20
problem, but I'm a bit surprised to hear that VBA don't support Unicode,=20
since I've used the Unicode option in China (simplified Chinese) and it=20
worked OK - the dialog control would display chinese characters and the d=
ata=20
would export OK.
In any case, the lack of any significant info about Vietnamese in the MS=20
Knowledge Base indicates that MS has not done a lot of work on that side.=
My=20
gut feeling is that using that VNI 8-bits codepage seems to be the best=20
option, in particular if the majority of PCs are running Windows 98 (whic=
h=20
does not directly support unicode in any case).
Keep me posted on progress. If you re-design some of the DHIS objects,=20
please try to do so in a way that does not disrupt how it works in other=20
locales.
If you take a look at the VBA module "modLanguage", you will see there's =
a=20
language constant called "LAN_VIETNAMESE". So you can use IF testing to=20
place forks in the code where necessary, like this:
If PrimaryLanguage(DefaultLanguage) =3D LANG_VIETNAMESE Then
<your forked code>
else
<current code>
End If
Best regards
calle
----- Original Message -----=20
From: "Thanh Ngoc Nguyen" <nn...@tm...>
To: "'Calle Hedberg'" <che...@te...>;=20
<ol...@st...>; "'Huan Viet Tran'" <tv...@tm...>
Cc: "'Dr. Jorn Braa'" <jb...@if...>; <pha...@ya...>;=20
<jdh...@li...>
Sent: Wednesday, November 03, 2004 12:31 AM
Subject: RE: Unicode problem - need assistance Follow-up
Dear all,
We can't export to text file using Unicode because when Save dialog showi=
ng=20
it doesn't allow us choose unicode type (utf-8). The language used in DHI=
S=20
1.3 is VBA 6. This version of VBA doesn't support Unicode characters. You=
=20
can see in the module basComDialogs:
---
Private Declare Function GetSaveFileName Lib "comdlg32.dll" Alias=20
"GetSaveFileNameA" (pOpenfilename As OPENFILENAME) As Long
---
The problem here I think is that API functions which go with VBA 6 don't=20
support Unicode. There are 2 solutions for this problem.
1. Using ANSI character instead of Unicode (We use VNI character code for=
=20
Vietnamese. This character code is only 8 bits).
2. Finding a comdlg32.dll or GetSaveFileName API function which support=20
Unicode.
Added comment by Ola: During implementation here in Vietnam our demand fo=
r=20
Wi2k/XP to have unicode support has made it difficult for us, as most=20
computers still run win98. If we go for solution 1 above, using the 8 bit=
=20
VNI code (same support for Vietnamese characters as unicode) it will be=20
easier to implement here. Then of course there is no Vietnamese in Region=
al=20
Settings, so we must do some tricks in order for the system to pull the=20
right strings from HISPML.mdb. We can of course use any other language (e=
.g=20
Swedish) as alias for the Vietnamese strings in Windows settings and HISP=
ML.=20
Thanh tells me that VNI code is what they use down here.
Regards,
Ola and Thanh
-----Original Message-----
From: Calle Hedberg [mailto:che...@te...]
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 Acces=
s
news groups, but (as I expected) there's no reply - I guess to the proble=
m
is just too "special" for such newsgroups.
If those sites referenced by Google do not provide further clues, I would
try to contact Microsoft Vietnam, or the local company representing MS in
Vietnam. Again, I'm sure others must have had the same problem and that
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=
,
but the description is in Vietnamese (which I don't understand) and the f=
ew
English words used indicate that the downloads relates to Word/Excel/Outl=
ook
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)
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
Common Dialog Control that opens up to save the export file, AND it will
actually process that "vietnamese" file name correctly. For instance, I h=
ad
also renamed a previous export file using the same replacement method, an=
d
the Common Dialog Control would correctly ask "A file by that name alread=
y
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 y=
ou
can find in the basComDialogs module) actually returns B? Y t? to the str=
ing
variable strDataFile used in the DHIS code even when I have manually
replaced those question marks with the Vietnamese characters.
My conclusion is that there is some fundamental "piece" missing in our
puzzle, since it obviously also affect the Windows Common controls
(MSCOMCTL.ocx and COMDLG32.dll)
I don't have more time to investigate this now, and it is difficult for m=
e
since some of the available materials (as you can expect) is in Vietnames=
e.
Regards
calle
|