Perl Unicode

Discussion in 'Perl' started by Hans Scholte, Jan 27, 2004.

  1. Hans Scholte

    Hans Scholte Guest

    Hi,

    I'm parsing an XML file wich contains some unicode. When I'm reading a
    textnode with a bit of unicode inside and keep it in a variable then, when I
    try rereading the same textnode with the aid of the variable then I cannot
    read back the node.
    Let me try to explain:

    I have the following xml document:
    <doc>
    <node>
    <ID>id1</ID>
    <value>value1</value>
    </node>
    <node>
    <ID>....</ID
    <value>foo / bar</value>
    <node>
    </doc>

    the second ID element contains four bytes, representing some unicode.
    $DOM represent the documentinstance

    trying to preserve the ID value with $tmp =
    $DOM->selectSingleNode('ID')->{'text'} leaves me with a smaller string then
    the original four characters. I cannot re-read with
    $DOM->selectSingleNode(ID[.="$tmp"])
    Anybody any idea?

    Hans
     
    Hans Scholte, Jan 27, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Robert Mark Bram
    Replies:
    0
    Views:
    3,931
    Robert Mark Bram
    Sep 28, 2003
  2. ygao

    unicode wrap unicode object?

    ygao, Apr 8, 2006, in forum: Python
    Replies:
    6
    Views:
    552
    =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=
    Apr 8, 2006
  3. Gabriele *darkbard* Farina

    Unicode digit to unicode string

    Gabriele *darkbard* Farina, May 16, 2006, in forum: Python
    Replies:
    2
    Views:
    523
    Gabriele *darkbard* Farina
    May 16, 2006
  4. gabor
    Replies:
    13
    Views:
    559
    Leo Kislov
    Nov 18, 2006
  5. Aqua
    Replies:
    3
    Views:
    150
Loading...

Share This Page