1. John Vanleeuwe
  2. PowerBuilder
  3. Tuesday, 27 November 2018 10:25 AM UTC

Hi guys,

 

using PB2017 R3.

 

I need to create an XML document from my app.

When i do the fileopen i code the EncodingAnsi parameter , but nonetheless the file being created is unicode ( i can see this when i do a save as in notepad).

 

The receiving party of my xml file insists this should be an ANSI file.

 

What can be the reason that the file ends being unicode even when i specifally coded the EncodingAnsi parameter please ?

 

One more thing : when i open my xml file in notepad , do a save as ANSI file , the file is accepted by the receiving party. When it's unicode its not.

 

What am i missing here ?

 

 

TIA

John

Accepted Answer
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 27 November 2018 17:46 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi John;

   Can you post a snippet of your App's working code?

Also ...

  1. Do you use "Stream" mode in the file open?
  2. Do you convert the XML data into a Blob for writing?
  3. Do you use the "extended" methods (ie: FileriteEx)?

Regards ... Chris

Comment
There are no comments made yet.
John Vanleeuwe Accepted Answer Pending Moderation
  1. Wednesday, 28 November 2018 07:03 AM UTC
  2. PowerBuilder
  3. # 1

Found it ! thanks Chris.

 

Comment
  1. Chris Pollach @Appeon
  2. Wednesday, 28 November 2018 14:51 PM UTC
Excellent news John!



What was the cause?
  1. Helpful
  1. John Vanleeuwe
  2. Wednesday, 28 November 2018 15:57 PM UTC
I only removed the blob(ls_a) and used FileWriteEx of the string instead of the blob(string).



John

  1. Helpful
  1. Chris Pollach @Appeon
  2. Wednesday, 28 November 2018 17:20 PM UTC
Ahhh .. Blob method processing probably should have been coded as ...



Blob (ls_a, EncodingANSI! )
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.