Working with Unicode in PocketBuilder  Reading and writing text or binary files

Chapter 19: Working with Unicode

Importing and exporting DataWindow data

NotePowerBuilder 9 formats not supported In PowerBuilder 9, ImportFile was enhanced to support CSV and XML, and SaveAs was enhanced to support PDF, XML, and XSL-FO. These formats are not supported in PocketBuilder.

You can use the ImportFile function to import data into a DataWindow control from a tab-delimited text (.txt) file or a dBase format 2 or 3 (.dbf) file.

Table 19-1: Formats for ImportFile

File type

File format to be imported

.txt

Both ANSI and Unicode files can be imported in PocketBuilder. Unicode files cannot be imported into PowerBuilder.

.dbf

Files created using either PowerBuilder or PocketBuilder can be imported into both versions.

You use the SaveAs function to save the contents of a DataWindow control to one of several file formats. The following table summarizes whether the file formats differ—specifically how character strings are handled and whether they are saved in ANSI or Unicode format.

Table 19-2: Formats for SaveAs

File type

Format of saved file

CSV!

Comma-separated values saved as Unicode strings

dBASE2!, dBASE3!, DIF!, Excel!, Excel5!, SYLK!, WKS!

Character strings saved as ANSI strings

HTMLTable!

HTML syntax saved as Unicode strings

SQLInsert!

SQL syntax and data values saved as Unicode strings

Text!

Text saved as Unicode strings





Copyright © 2004. Sybase Inc. All rights reserved. Reading and writing text or binary files

View this book as PDF