V4RB2 UTF-8 and UTF-16
Karl Grob
kgrob at mus.ch
Wed Mar 30 10:03:51 CST 2005
I experience the following problem:
Just for information:
Function toValDB(s As string) As String
if s.Encoding = NIL then
s = s.DefineEncoding(Encodings.SystemDefault)
else
s = s.ConvertEncoding(Encodings.UTF16)
end if
return s
End Function
--------------
and now the problem:
tmp is just for Debugging purposes
Database is UTF-16
s = "Müller" // = UTF-8
tmp = toValDB(s)
cur.StringField(HKKAdb.Rec_Benutzer.Fld_BenName.Name).Value = tmp
-> Leaves the string-Field empty
tmp = NthField(s)
cur.StringField(HKKAdb.Rec_Benutzer.Fld_BenName.Name).Value = tmp
-> String-Fields are filled, but Müller becomes M ller (in Valentina
Studio)
It seems that the Database does not accept UTF-16-Strings if itself is
UTF-16 and that the encoding of other strings is not correct?
Database is UTF-8:
Valentina Studio crashes immediately, no chance to check.
Has anyone a guess?
Thanks Karl
------
Karl Grob
Glockengasse 4
CH-8001 Zürich
kgrob at mus.ch
More information about the Valentina
mailing list