26-11-20 08:09 AM
Answered! Go to Answer.
26-11-20 02:48 PM
Hi,
1. two possible ways:
a.
change registry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\Text
"Format" = "TabDelimited"
or
"Format" = "Delimited(~)"
b.
have a "Schema.ini" file in the source folder with the data:
[your source directory]
Format=Delimited(~)
See for more details on schema.ini files there:
https://docs.microsoft.com/en-us/sql/odbc/microsoft/schema-ini-file-text-file-driver?redirectedfrom=MSDN&view=sql-server-ver15
2. try to add "CharacterSet=65001;" to the connection string in the code (make a copy of action "Get CSV Text As Collection" )
instead of
Dim cn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Folder & ";Extended Properties=""Text;HDR=" & HDRString & ";FMT=Delimited;""")
use
Dim cn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Folder & ";Extended Properties=""Text;HDR=" & HDRString & ";FMT=Delimited;CharacterSet=65001;""")
see if data are correctly taken as UTF-8
26-11-20 02:48 PM
Hi,
1. two possible ways:
a.
change registry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\Text
"Format" = "TabDelimited"
or
"Format" = "Delimited(~)"
b.
have a "Schema.ini" file in the source folder with the data:
[your source directory]
Format=Delimited(~)
See for more details on schema.ini files there:
https://docs.microsoft.com/en-us/sql/odbc/microsoft/schema-ini-file-text-file-driver?redirectedfrom=MSDN&view=sql-server-ver15
2. try to add "CharacterSet=65001;" to the connection string in the code (make a copy of action "Get CSV Text As Collection" )
instead of
Dim cn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Folder & ";Extended Properties=""Text;HDR=" & HDRString & ";FMT=Delimited;""")
use
Dim cn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Folder & ";Extended Properties=""Text;HDR=" & HDRString & ";FMT=Delimited;CharacterSet=65001;""")
see if data are correctly taken as UTF-8
30-11-20 08:44 AM