Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Chinese Characters

2 posts in FoxPro Last posting was on 2008-06-19 18:03:11.0Z
John Posted on 2008-06-18 22:54:09.0Z
From: "John" <sekritemail@yahoo.com>
Newsgroups: Advantage.FoxPro
Subject: Chinese Characters
Date: Wed, 18 Jun 2008 18:54:09 -0400
Lines: 23
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 70.16.166.155
Message-ID: <485990b4@solutions.advantagedatabase.com>
X-Trace: 18 Jun 2008 16:48:20 -0700, 70.16.166.155
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!70.16.166.155
Xref: solutions.advantagedatabase.com Advantage.FoxPro:258
Article PK: 1109613

Hi All. I left a post in the "General" group and Alex replied with some
info but suggested I ask the question about importing and exporting with
VFP9 in this group.

Someone has provided me with an XLS file that contains Chinese characters.
Thats all I know about the file (i.e. I don't know the CodePage its using).
I would like to get this data into a VFP9 DBF file for storage. I will
*not* need to edit the data in the DBF. I just need to "carry it around"
with the rest of the data that will be edited via a C# .NET Advantage app.
I just need to use VFP to get the data into (and out of) the DBF. I will
need to export this data back out to a CSV or XLS file later.

I figure I can save the fields in VarChar (Binary) (this is a VFP9 format).
Alex suggested a Binary Blob field if the data was large because the varchar
binary is limited to 254 characters. I think either way will work. I just
need to get it into the DBF, carry it around then get it back out and I
figure the easiest way to import/export is using VFP.

If anyone can give me some tips on importing and exporting data with Chinese
characters using VFP I would really appreciate it. Thanks.


Mark Wilkins Posted on 2008-06-19 18:03:11.0Z
From: "Mark Wilkins" <mark@no.email>
Newsgroups: Advantage.FoxPro
References: <485990b4@solutions.advantagedatabase.com>
Subject: Re: Chinese Characters
Date: Thu, 19 Jun 2008 12:03:11 -0600
Lines: 46
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 10.24.38.228
Message-ID: <485a9dfc@solutions.advantagedatabase.com>
X-Trace: 19 Jun 2008 11:57:16 -0700, 10.24.38.228
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!10.24.38.228
Xref: solutions.advantagedatabase.com Advantage.FoxPro:259
Article PK: 1109612

Hi John,

Google turns up some utilities that export from XLS files to other formats.
I didn't search a long time, though. However, one possible way is to use
ODBC. There is an ODBC driver named "Microsoft Excel Driver" that can read
.xls files. Set up an ODBC DSN to point to the .xls file and then run a
query such as: select * from "sheet1$" (or specify the column name).

This will grab the data out of the specified sheet in the Excel file. If
the Unicode data is bound to a WCHAR column it reads it without any
conversion. I just did a quick test (using C) and extracted some Arabic and
Russian Unicode characters from an .XLS file. Using ODBC inside Visual
FoxPro should (I think) be fairly straight forward to read the data and
write it directly to a .DBF.

Mark Wilkins
Advantage R&D

"John" <sekritemail@yahoo.com> wrote in message
news:485990b4@solutions.advantagedatabase.com...
> Hi All. I left a post in the "General" group and Alex replied with some
> info but suggested I ask the question about importing and exporting with
> VFP9 in this group.
>
> Someone has provided me with an XLS file that contains Chinese characters.
> Thats all I know about the file (i.e. I don't know the CodePage its
> using). I would like to get this data into a VFP9 DBF file for storage. I
> will *not* need to edit the data in the DBF. I just need to "carry it
> around" with the rest of the data that will be edited via a C# .NET
> Advantage app. I just need to use VFP to get the data into (and out of)
> the DBF. I will need to export this data back out to a CSV or XLS file
> later.
>
> I figure I can save the fields in VarChar (Binary) (this is a VFP9
> format). Alex suggested a Binary Blob field if the data was large because
> the varchar binary is limited to 254 characters. I think either way will
> work. I just need to get it into the DBF, carry it around then get it
> back out and I figure the easiest way to import/export is using VFP.
>
> If anyone can give me some tips on importing and exporting data with
> Chinese characters using VFP I would really appreciate it. Thanks.
>
>
>