FileWrite - XML encoding

I have an NVO which handles XML writing using standard FileOpen / FileWrite
functions to stream XML data into a file.  I've hit a problem.

The XML is specified as encoding in UTF-8, which seemed to work, but MSXML is
failing to parse the output file when a � (UK Pound sign) is included in the
XML.  If I specify ISO-8859-1 as the encoding, MSXML doesn't complain, but
outputs a question mark instead.

Strangely, I can open the file fine in XML Spy and if is re-save it (no changes)
MSXML doesn't complain.  The contents of the XML file (as viewed in Notepad)
appear the same, so the only thing that could be different is the text encoding.

What encoding is actually used by the PB file functions?

Any other ideas [...Unfortunately, upgrade to PB9 is not yet an option...] ?

TIA

---== Posted via the PFCGuide Web Newsreader ==---
http://www.pfcguide.com/_newsgroups/group_list.asp 
0
Jared
5/7/2003 4:43:41 PM
sybase.powerbuilder.xml 546 articles. 0 followers. Follow

2 Replies
637 Views

Similar Articles

[PageSpeed] 52

PB is not using Unicode or UTF -- your files are exported as ASCII-7. Have
you considered using XMLSpy's COM interface to script the writing of the
XML?

-- 
<hopethishelps/>
Roy Kiesler [TeamSybase]
SDN CoeXchange -- http://codexchange.sybase.com

"Jared Cooper" <jaredcooper@fairbanks.co.uk> wrote in message
news:e$Q%23RfLFDHA.221@forums-1-dub...
> I have an NVO which handles XML writing using standard FileOpen /
FileWrite
> functions to stream XML data into a file.  I've hit a problem.
>
> The XML is specified as encoding in UTF-8, which seemed to work, but MSXML
is
> failing to parse the output file when a � (UK Pound sign) is included in
the
> XML.  If I specify ISO-8859-1 as the encoding, MSXML doesn't complain, but
> outputs a question mark instead.
>
> Strangely, I can open the file fine in XML Spy and if is re-save it (no
changes)
> MSXML doesn't complain.  The contents of the XML file (as viewed in
Notepad)
> appear the same, so the only thing that could be different is the text
encoding.
>
> What encoding is actually used by the PB file functions?
>
> Any other ideas [...Unfortunately, upgrade to PB9 is not yet an option...]
?
>
> TIA
>
> ---== Posted via the PFCGuide Web Newsreader ==---
> http://www.pfcguide.com/_newsgroups/group_list.asp


0
Roy
5/7/2003 10:13:32 PM
Thanks, Roy, that was pretty much what I was thinking.

I've found that I can hex-encode the pound sign and this works, so I'll stick
with this for now I'll have to keep an eye out for any others (Maybe I can start
to push for PB9...).

Thanks.

On Wed, 7 May 2003 18:13:32 -0400,
 in powersoft.public.powerbuilder.xml
Roy Kiesler [TeamSybase] <SPAM_FREE_roy.kiesler@teamsybase.com> wrote: 
>PB is not using Unicode or UTF -- your files are exported as ASCII-7. Have
>you considered using XMLSpy's COM interface to script the writing of the
>XML?
>
>-- 
><hopethishelps/>
>Roy Kiesler [TeamSybase]
>SDN CoeXchange -- http://codexchange.sybase.com
>
>"Jared Cooper" <jaredcooper@fairbanks.co.uk> wrote in message
>news:e$Q%23RfLFDHA.221@forums-1-dub...
>> I have an NVO which handles XML writing using standard FileOpen /
>FileWrite
>> functions to stream XML data into a file.  I've hit a problem.
>>
>> The XML is specified as encoding in UTF-8, which seemed to work, but MSXML
>is
>> failing to parse the output file when a � (UK Pound sign) is included in
>the
>> XML.  If I specify ISO-8859-1 as the encoding, MSXML doesn't complain, but
>> outputs a question mark instead.
>>
>> Strangely, I can open the file fine in XML Spy and if is re-save it (no
>changes)
>> MSXML doesn't complain.  The contents of the XML file (as viewed in
>Notepad)
>> appear the same, so the only thing that could be different is the text
>encoding.
>>
>> What encoding is actually used by the PB file functions?
>>
>> Any other ideas [...Unfortunately, upgrade to PB9 is not yet an option...]
>?
>>
>> TIA
>>
>> ---== Posted via the PFCGuide Web Newsreader ==---
>> http://www.pfcguide.com/_newsgroups/group_list.asp
>
>
0
Jared
5/8/2003 8:37:03 AM
Reply:

Similar Artilces:

doubled Encode.pm: ext\Encode\Encode.pm and lib\Encode.pm
Hello, developers! Currently @15439 I see some surprising situation: Encode.pm has doubled: ext\Encode\Encode.pm lib\Encode.pm moreover, its documentation friends have also doubled: ext\Encode\lib\EncodeFormat.pod ext\Encode\lib\Encode\Details.pod ext\Encode\lib\Encode\Supported.pod ext\Encode\lib\Encode\Encoding.pm lib\EncodeFormat.pod lib\encode\Details.pod lib\encode\Supported.pd lib\encode\Encoding.pm and so have the .enc files: ext\Encode\Encode lib\Encode So I see the following locations have surprising content: lib\Encode ext\Encode ext\Encode\E...

Encode vs encoding
Hi to all list users. Can someone *please* explain me the difference between (except the scope) encoding and Encode::encode()? I know encoding affects all the code, but what else does it do to do the right thing or am I missing something with Encode? I'm using ActivePerl 5.8.4 build 810 under Windows 2000 and here are the examples: #!/usr/bin/perl -w use strict; my $char = "\xFE"; print ord $char; # prints 254 #!/usr/bin/perl -w use strict; use Encode; my $char = "\xFE"; $char = encode 'ISO-8859-9', $char; print ord $char; # prints 6...

[PATCH] Encode::Encoding
package Encode::MyEncoding; use base qw(Encode::Encoding); __PACKAGE__->Define(qw(myCanonical myAlias)); dies saying: Error: Undefined subroutine &Encode::define_encoding called at ... Patch follows after sig. -- Tatsuhiko Miyagawa <miyagawa@edge.co.jp> --- lib/Encode/Encoding.pm~ Sun Apr 28 05:09:05 2002 +++ lib/Encode/Encoding.pm Mon May 6 18:48:59 2002 @@ -3,6 +3,8 @@ use strict; our $VERSION = do { my @r = (q$Revision: 1.29 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; +require Encode; + sub Define { ...

PowerBuilder Export-File Encoding
When Power Builder exports code-objects, special caracters are encoded in some HEX-encoding (like for german '=fc' =3d $$HEX1$$fc00$$ENDHEX$$). Is it possible to avoid this or let PB export Files in Unicode Encoding ? Thank's axel Yes. When you export a class you get a drop down on the dialog to choose the encoding. What you are seeing is HEXASCII. UTF16 LE and UTF8 are other options > When Power Builder exports code-objects, special caracters > are encoded in some HEX-encoding (like for german '=fc' > $$HEX1$$fc00$$ENDHEX$$). Is it possible to avoid...

[Encode] Encoding vs. Charset
Encode hackers (Especially Autrijius) I am now fairly content with the feature set of Encode so I decided to write some programs based upon it. And I have found that most of Chinese (Continental; seems like Taiwanese are much more technically correct) and Korean mails and web pages confuse "charset" and "encodings". That is, charset="gb2312" really means euc-cn and charset="ks_c_5601-1987" really menas euc-kr. Sadly this misconception is enbedded to popular browsers. So when you try something like my ($encname) = /^Content...

Powerbuilder 5 to Powerbuilder 10
Hi all We have migrated our application from powerbuilder 5 to powerbuilder 10. after migration to version 10, alignment in most of reports disturbed. please advice me some solution. On Fri, 29 Feb 2008 12:45:01 +0100, Adnan Jamil <adnanjamil@nji.com.pk> wrote: > Hi all > > We have migrated our application from powerbuilder 5 to powerbuilder 10. > after migration to version 10, alignment in most of reports disturbed. > please advice me some solution. Adnan, Is this a SQL Anywhere question? If not, you have posted to the wrong forum. If yes,...

Use PowerBuilder DLL in PowerBuilder
We use PB6.5. We would want to use a DLL create from PB in a PB application. We compiled an a PBL as DLL. After we tried to use DLL in a user object external, but without success. How can we do to use DLL create from PB or use in a new PB application some object (visual and no) before compiled with PB? Any help will be appreciated. Saul.Convalle@mail.cec.it Thanks When you create a DLL from a PB library it is not really a standard Windows DLL. I'm not sure what the difference is. If you are making calls from PB then just use the standard PB calling syntax the ...

Html.Encode encodes too much
Hi, When I output some french characters like é è ç à with Hml.Encode, they are escaped as &#233; &#232; &#231; &#224 in the generated HTML. I fear to see almost everything escaped if I translate my application into korean or russian. If I am not wrong, only < > & and " should be escaped. All the other characters are handled directly by the HTTP response encoding (iso-8859-1 for my french characters) and thus should be kept as is in the generated HTML.   Is there a way to override the default Html.Encode by another one ?   It's p...

charset/base64 encoding/encode.
Still futzing around with email and character sets. Under Encode and perluniintro there's mention of octet \x{..} (255 chars up to \xff string some internal representation code point \x{...} 1, 2 or more bytes of data But I'm not sure about the order of things. So I'll try this: I have a MIME messsage part like the following: Content-Type: text/plain; charset="BIG5" Content-Transfer-Encoding: base64 1eLKx9K7t+JIVE1MuPHKvdDFvP6joQ0KCqFYoVihWKFYoVihWKFYoVihWKFYoVihWKFYoVihWKFY oVihWKFYoVihWKFYoVihWKFYoVihWKFYoVihWAqhaapgt06haqRX...

Encode::encode MIME-Header
The routine should not gobble up white space. This leads to all manner of bad side-effects, such as encoded words starting and ending with spaces where you'd want words surrounded by spaces, or encoding sequences of words instead of single words. Fix: When constructing $especials, change the first line to read join( '|' => '\s', map { quotemeta( chr($_) ) } ---------------^^^^^ ...

[Encode] Encode::Supported revised
Folks, Encode is near completion. I am still bulding djgpp environment for possible fixes needed but anything else is over. Meanwhile, Please have a look at Encode::Supported revised for added Encodings (now Encode comes with all encodings covered by http://www.unicode.org/Public/MAPPINGS/ -- except for Indics which are beyond cap. of the current encengine; Algorithmical approaches still possible. Porters wanted. See below). Enjoy. Dan the Encode Maintainer =head1 NAME Encode::Supported -- Supported encodings by Encode =head1 DESCRIPTION =head2 Encodin...

[PATCH 5.7.3 Encode] encoding.t not properly skipped when Encode extension not built
--- lib/encoding.t 2002/03/28 09:20:19 1.1 +++ lib/encoding.t 2002/03/28 09:20:34 @@ -1,4 +1,9 @@ BEGIN { + require Config; import Config; + if ($Config{'extensions'} !~ /\bEncode\b/) { + print "1..0 # Skip: Encode was not built\n"; + exit 0; + } if (ord("A") == 193) { print "1..0 # encoding pragma does not support EBCDIC platforms\n"; exit(0); Same problem here in lib/open.t, but this one isn't so easy to fix. Someone with more understanding should look at it. ...

Some Persian encodings unsupported in Encode module
Perhaps this would have been already well known, but I happened to come across "CSets: Supplemental Unicode Mapping Tables". <http://crl.nmsu.edu/~mleisher/csets.html> where, among others, you'll find mapping tables for Iran System, IRNA, ISIRI 2900 and ISIRI 3342, which are not supported in Encode 1.97. seemingly due to lack of documentation. While ISIRI 3342 is a logical encoding, Iran System, IRNA and ISIRI 2900 are visual ones, so would need some algorithm in conversion into them. In conversion from them, I think isolated, initial, medial and final ...

[Encode] poll; should *.ucm be relocated out of Encode?
Encode Hackers, I think I have overlooked the impact of ucm-transition. It is possible that *.ucm be relocated elsewhere so they won't be installed in lib/perl5. Unlike *.enc files which are actually used by modules *.ucm are not needed for runtime because they are all compiled-in. I would enjoy *.ucm installed but (ports|pkg|rpm) maintainers would think otherwise. My opinion is a little shaky but I am against it because in a way they can act like pod for *.pm. Surely we can use it more creatively than just a source of XS. How about ucmdoc :? But once agai...

FYI: Encode performance on Japanese encodings
I was curious to find how fast or slow Encode is against popular Japanese transcoder modules. So I benchmarked and relieved that Encode's performance was good! I benchmarked it against Jcode.pm (mine, too) and jcode.pl (the first and still popular transcoder available since Perl4 by Utashiro-san) and here is the result. Except for 7bit-jis (ISO-2022) <-> euc-jp Encode performed the best. And even for those losing against Jcode.pm, performance loss is not that big. Note Unicode conversion tests are missing from jcode.pl because they are unimplemented thereby. T...

Web resources about - FileWrite - XML encoding - sybase.powerbuilder.xml

Arduino - AllRecentChanges
Main.Buy . . . June 26, 2012, at 10:15 AM by Davide Gomba ? : Reference.SoftwareSerialRead . . . May 25, 2012, at 09:48 AM by Tom Igoe ? : T ...

4umi useful Javascript
4umi.com / web / javascript / An Ode to Javascript The language that made the machine talk to us Welcome to our little treasure grove stuffed ...

Most popular in "System" - Fossdroid
Fossdroid.com's aim is to promote free and open source software on the Android platform thanks to F-Droid project.

Resources last updated: 12/30/2015 2:23:32 PM