Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 38 total
Thread ansi export => unicode import
Sun, Nov 22 2009 9:12 PMPermanent Link

"David Cornelius"
I'm trying to convert an EDB 2.03 ANSI database to EDB 2.03 Unicode.
The suggested method is to export all tables to .CSV, then import them
into the new database.  It seems this is the only way to move from ANSI
to Unicode at this time.

The export went fine and created a bunch of files that look like normal
..CSV files.  I wondered about the word-wrapping in note fields, but
decided to start with a small table with very few fields, none of them
with long strings.

But I immediately get error 904 with the information: "The import file
is truncated or incomplete."  I tried this with both column headers on
and off.  I also tried removing the very last line, which was blank
thinking that perhaps an extra CR/LF was throwing it off.  Lastly, I
added bogus values to the very last field of lines where the last field
had been NULL.

No luck.  I guess I'm not converting tonight.


--
David Cornelius
CorneliusConcepts.com
Sun, Nov 22 2009 9:59 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

David,

<< I'm trying to convert an EDB 2.03 ANSI database to EDB 2.03 Unicode. The
suggested method is to export all tables to .CSV, then import them into the
new database.  It seems this is the only way to move from ANSI to Unicode at
this time. >>

You're going to need to make sure to conver the ANSI .csv files into
Unicode.  You can do this using Notepad, but it will also add a small 2-byte
header to the files, which EDB will not like.  If you want to send me the
..csv files, I can convert them for you.  This functionality is already on
the list for EDB - import/export and specifying the type of input file
(ANSI/Unicode).

--
Tim Young
Elevate Software
www.elevatesoft.com

Sun, Nov 22 2009 11:16 PMPermanent Link

"David Cornelius"
> You're going to need to make sure to conver the ANSI .csv files into
> Unicode.  You can do this using Notepad, but it will also add a small
> 2-byte header to the files, which EDB will not like.  If you want to
> send me the .csv files, I can convert them for you.  This
> functionality is already on the list for EDB - import/export and
> specifying the type of input file (ANSI/Unicode).

Ah!  Can you tell I'm new to Unicode?  Thanks for the tip--I converted
them all and they imported just fine.  Maybe I will get this update out
tonight!

Thanks for your quick response on a weekend!

--
David Cornelius
CorneliusConcepts.com
Mon, Nov 23 2009 4:36 AMPermanent Link

"Malcolm"
Tim Young [Elevate Software] wrote:


> You're going to need to make sure to conver the ANSI .csv files
> into Unicode.  You can do this using Notepad, but it will also add
> a small 2-byte header to the files, which EDB will not like.  If
> you want to send me the .csv files, I can convert them for you.
> This functionality is already on the list for EDB - import/export
> and specifying the type of input file (ANSI/Unicode).

Hmm, I have been tring something similar having downloaded ANSI .csv
files from the web and tried to IMPORT them into UNI.
I am trying to do it programatically and have not cracked it yet.

Any hints gratefully received until you add the TEncoding goodies to
Import/Export.  Surprised

Malcolm

--
Mon, Nov 23 2009 5:25 AMPermanent Link

"James Relyea"



Attachments: Unicode.jpg
Mon, Nov 23 2009 6:33 AMPermanent Link

"Malcolm"
James Relyea wrote:

Thanks James .. but I need it in code.
It now seems my only problem is getting rid of the BOM ...

--
Mon, Nov 23 2009 7:28 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Malcolm


If you're using a unicode version of Delphi (I'm still on D2006 and intending to stay there a while) would load into and ansi component, transfer in memory to a unicode one and write out work?

Roy Lambert
Mon, Nov 23 2009 7:55 AMPermanent Link

"Malcolm"
Roy Lambert wrote:

> Malcolm
>
>
> If you're using a unicode version of Delphi (I'm still on D2006 and
> intending to stay there a while) would load into and ansi
> component, transfer in memory to a unicode one and write out work?
>
> Roy Lambert

Hi Roy,  I wish!

The best I have managed so far is to write the file out as a unicode
file with a BOM.  But as Tim has already said, the BOM causes the
IMPORT to .. well .. bomb.

If I use a hex editor to zap the BOM it *will* import so I am looking
for an elegant means to delete the BOM or better still to avoid
writing it in the first place without having Delphi then converting
it back to ANSI.  I even tried casting the unicode strings to
rawbytestrings before writing the file but either I got it wrong or
all that does is convert it back to ansi.  <grrrr>

Probably easy to do, I just can't find anything in the Help
(Delphi/ElevateSoft) and as I am sure Tim will soon(!) implement
encoding parameters/handling, I don't want to start post-editing the
file to delete the BOM.

While my main app cries out for unicode, it also has to deal with
serial devices, 3rd party ansi systems and semi-unicode aware web
systems, so I seem to have set myself a particularly awkward
conversion.   Surprised

I can just hear Tim finishing his breakfast and preparing to come
galloping to the rescue .. er ..

--
Mon, Nov 23 2009 9:17 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Malcolm


Try posting on the codegear newsgroups. They have loads of gurus there.

Roy Lambert
Mon, Nov 23 2009 11:01 AMPermanent Link

"Malcolm"
Roy Lambert wrote:

> Malcolm
>
>
> Try posting on the codegear newsgroups. They have loads of gurus
> there.
>
> Roy Lambert

I will, Roy, if it comes to it.
But Tim's EXPORT already writes such a file so he will know how to do
it and if it is not a part of Delphi I have missed he may fess-up to
another undocumented function. Smiley

--
Page 1 of 4Next Page »
Jump to Page:  1 2 3 4
Image