Home > database >  How to use PB to convert the text files encoded utf-8 encoding ANSI
How to use PB to convert the text files encoded utf-8 encoding ANSI

Time:09-30

How to use PB to convert the text files encoded utf-8 encoding ANSI

CodePudding user response:

Focus on

CodePudding user response:

Fileopen () function with parameters, finally a encoding is Character encoding of the file you want to create. Specify this argument when you create a new text file using the text or line mode. If you do not Specify an encoding, the file is created with ANSI encoding. Values are: EncodingANSI! (the default) EncodingUTF8! EncodingUTF16LE! ? EncodingUTF16BE!

In the help file

CodePudding user response:

The Description

Converts a character string to an ANSI blob.

Syntax

ToAnsi (string)

CodePudding user response:

 
//encodingUTF8 file content
Il_FileNum=Fileopen (& amp;
Is_fullName StreamMode! , Read! , LockReadWrite! The replace! , encodingUTF8!)
FileReadEx (il_FileNum lb_input)
FileClose (il_fileNum)
//save EncodingANSI new file
Il_FileNum=Fileopen (& amp;
Is_fullName, TextMode! The write! , LockReadWrite! The replace! , EncodingANSI!)
FileWriteEx (il_fileNum lb_Input)
FileClose (il_fileNum)

CodePudding user response:

If it is a previous version, I was 9, if there is not this parameter fileopen oh

CodePudding user response:

XML using pb9 read is NUll, but the same code in pb115 can read properly
  • Related