The Artima Developer Community
Sponsored Link

Python Buzz Forum
Filemaker's XML is not UTF-8

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Victor Ng

Posts: 112
Nickname: victorng
Registered: Aug, 2003

Victor Ng programs Python for money, but he'd be programming Python anyway if he was a bum.
Filemaker's XML is not UTF-8 Posted: May 19, 2004 2:25 AM
Reply to this message Reply

This post originated from an RSS feed registered with Python Buzz by Victor Ng.
Original Post: Filemaker's XML is not UTF-8
Feed Title: Victor Ng's Weblog
Feed URL: https://blog.crankycoder.com/feed/atom/
Feed Description: Python Feed
Latest Python Buzz Posts
Latest Python Buzz Posts by Victor Ng
Latest Posts From Victor Ng's Weblog

Advertisement

Oh yes. We’ve had some more weird requirements thrown at us. More Filemaker nastiness to contend with.

After a protracted period of wrangling with with the XML thath FMP’s Web Companion spits out, Gerry and I finally figured out what was wrong with the XML all this time (wow - it’s been almost a year).

FMP declares an encoding type of UTF-8 pretty explicitly :

Of course - that’s a bloody lie. The real encoding is latin-1. Yes boys and girls - Filemaker goes to the trouble of specifying the wrong character encoding.

So when parsing the XML, just force the encoding type to ‘latin-1’ and process to your hearts content:

data = unicode(data, ‘latin-1’)

The sooner I get this current project done, the sooner I can kick FMP to the curb.

In other news - we had our product weekend at work this past weekend. Much hilarious behaviour ensued. The technology boys of the company took home the dubious prizes for “Best Return Performance” and “Best Newbie Performance” at the big party on Saturday night.

My recollection of Saturday night is - uhm…. fuzzy at best. I think I made an inappropriate comment about someone being a wiccan. But really - can you blame me?

My import problems with Python seem to have gone away now. We’ve managed the problem by fully qualifying all of our packages. Stupid, ugly, but it works for now. Our code has gone from:

import compass.model.agent as m_agent

to :

import compass.model.agent

Accordingly, we need to qualify the object creation with a fully qualilfied classname when we invoke the constructor.

Lame. Very very lame.

Read: Filemaker's XML is not UTF-8

Topic: CL-YHAL Previous Topic   Next Topic Topic: PyOne

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use