SQL Special characters

58 views
Skip to first unread message

Henry Fidler

unread,
Jun 30, 2021, 2:46:28 PMJun 30
to
I am using "MySQL ODBC 8.0 Unicode Driver" from oracle.
The MySQL is collated “utf8_general_ci”
Calling oSQLSelect:FieldGetFormatted()
I do not get the european letters, for example instead of “ä”, I get “ä”.

How can I get the real characters?

Henry

dlzc

unread,
Jul 1, 2021, 12:52:13 PMJul 1
to
Dear Henry Fidler:
I know this does not help much but the contents of the file are NOT encoded as "utf8_general_ci", or your "display" means is not understanding "utf8_general_ci".

https://en.wikipedia.org/wiki/UTF-8

I submit it is stored as a 2-byte character (and you are getting both bytes), and your display means is expecting only single bytes.

David A. Smith

Wolfgang Riedmann

unread,
Jul 2, 2021, 1:08:26 AMJul 2
to
Hi Henry,

VO does not uses Unicode.

In the VO System Library there are two functions that are not in the
help:
UTF82Ansi() and Ansi2UTF8()

FUNCTION Ansi2UTF8(cString AS STRING) AS STRING
RETURN ConvertFromCodePageToCodePage(cString, CP_ACP, CP_UTF8)

FUNCTION Utf82Ansi(cString AS STRING) AS STRING
RETURN ConvertFromCodePageToCodePage(cString, CP_UTF8, CP_ACP)

HTH

Wolfgang
--

Henry Fidler

unread,
Jul 3, 2021, 5:04:43 AMJul 3
to
Wolfgang vielen Dank, it does save time.

Where can one see the undocumented functions?

Henry

Wolfgang Riedmann

unread,
Jul 4, 2021, 9:18:21 AMJul 4
to
Hi Henry,

> it does save time.
>
> Where can one see the undocumented functions?

try to look in the System Library - maybe you find something other
useful.

Wolfgang

--

Reply all
Reply to author
Forward
0 new messages