FileEncoding – PB Docs 126

FileEncoding PowerScript function

Description

Checks the encoding of the specified file.

Syntax

Argument

Description

filename

The name of the file you want to test
for encoding type

Return Values

A value of the enumerated datatype Encoding. Values are:

  • EncodingANSI!

  • EncodingUTF8!

  • EncodingUTF16LE!

  • EncodingUTF16BE!

If filename does not exist, returns null.

Usage

Use this function to determine the encoding used in an external
file before attempting to use it in a PowerBuilder application.

Examples

The following example opens a file in stream mode
and tests to determine whether it uses ANSI encoding. If it does,
it reads data from the file into a blob and uses the String function
to convert the blob to a Unicode string:

See Also


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x