Jump to content

keithodulaigh.com

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

keithodulaigh.com's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi Everyone, I know that there's a lot of discussion about character encoding and after searching I'm still having problems. I set up a database table for users with utf8_general_ci as the collation. I then tried inserting "Ó Dúlaigh" as the last name of a test user. When I view the database then in phpMyAdmin that name appears incorrectly like an A with a tilde on top. I've tried running the name throught htmlentities() and doing a strtr() but that just made that name appear as: Ó Dúlaigh. My PHP script is saved with UTF8 encoding. I've also tried reading back the data from the database without using phpMyAdmin but appears messed up as well. Can anyone offer me some advice on this problem? Not all of my special characters will be hard-coded into the script. Some will be the result of user input. Many thanks, Keith
  2. It's okay now, I spoke to the author of that XML parser and he told me that when I want to access tags with : in them to just replace the : with _ and to write in lowercase. All is working now! Thanks.
  3. Hi Everyone, I'm trying to parse the XML document that I've attached. The problem is the tags have : in their name, for example: <dc:title>bla bla bla</dc:title> Simple XML won't load the file without errors (it complains about some of the URLs in the document.) I've also tried the XML parser that I downloaded from here: http://www.criticaldevelopment.net/xml/doc.php (The download link is tucked away in the top left corner.) The above parser loads the document without error. To retrieve the value inside <dc:title>value</dc:title> would require me writing something like: $parser->document->...->dc:title[0]->tagData; which I can't do. Is there anyone who can point me in the right direction. Thanks in advance, Keith PS: I know I could use string replace to remove the : from the file but that's not desirable. The formatting of the document can't really be changed. It's the format used by Fedora Commons' Open Source Digital Repository. (http://www.fedora-commons.org/) [attachment deleted by admin]
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.