LibXML and the British pound

Discussion in 'XML' started by Vic Russell, Oct 14, 2003.

  1. Vic Russell

    Vic Russell Guest

    Hi,

    I'm trying to get the British pound (£) symbol through LibXML and just get
    "£" instead. Any ideas?

    Vic
     
    Vic Russell, Oct 14, 2003
    #1
    1. Advertising

  2. "Vic Russell" <> schrieb im Newsbeitrag
    news:bmh00m$c9s$...
    > Hi,
    >
    > I'm trying to get the British pound (£) symbol through LibXML and just get
    > "£" instead. Any ideas?


    It's the same thing. Where's the problem here?
     
    Julian F. Reschke, Oct 14, 2003
    #2
    1. Advertising

  3. Vic Russell

    arachno Guest

    <skip:sarcasm>maybe problem is that it's not british enough
    =)</skip:sarcasm>
     
    arachno, Oct 14, 2003
    #3
  4. Vic Russell

    Vic Russell Guest

    Euroverthetop there but thanks
    "arachno" <> wrote in message
    news:bmh2oe$ml175$-berlin.de...
    > <skip:sarcasm>maybe problem is that it's not british enough
    > =)</skip:sarcasm>
    >
    >
     
    Vic Russell, Oct 14, 2003
    #4
  5. Vic Russell

    Vic Russell Guest

    I know this is the code, but I get "£" coming out literally in the
    output.
    "Julian F. Reschke" <> wrote in message
    news:bmh1jc$mdr4t$-berlin.de...
    > "Vic Russell" <> schrieb im Newsbeitrag
    > news:bmh00m$c9s$...
    > > Hi,
    > >
    > > I'm trying to get the British pound (£) symbol through LibXML and just

    get
    > > "£" instead. Any ideas?

    >
    > It's the same thing. Where's the problem here?
    >
    >
    >
     
    Vic Russell, Oct 14, 2003
    #5
  6. Vic Russell wrote:
    > "Julian F. Reschke" <> wrote in message
    > news:bmh1jc$mdr4t$-berlin.de...
    >
    >>"Vic Russell" <> schrieb im Newsbeitrag
    >>news:bmh00m$c9s$...
    >>
    >>>Hi,
    >>>
    >>>I'm trying to get the British pound (£) symbol through LibXML and just

    >
    > get
    >
    >>>"£" instead. Any ideas?

    >>
    >>It's the same thing. Where's the problem here?
    >>

    > I know this is the code, but I get "£" coming out literally in the
    > output.


    If you really get "£" in the output (code), everthing's fine. If
    you get "&amp;#163;", there is something wrong.
    --
    Johannes Koch
    In te domine speravi; non confundar in aeternum.
    (Te Deum, 4th cent.)
     
    Johannes Koch, Oct 14, 2003
    #6
  7. In article <bmh6ai$sb4$>,
    Vic Russell <> wrote:

    >I know this is the code, but I get "£" coming out literally in the
    >output.


    If your output is XML, that doesn't matter.

    If your output *isn't* XML, your probably outputting it the wrong way!

    -- Richard
    --
    Spam filter: to mail me from a .com/.net site, put my surname in the headers.

    FreeBSD rules!
     
    Richard Tobin, Oct 14, 2003
    #7
  8. In article <bmh6ai$sb4$>,
    Vic Russell <> wrote:

    % I know this is the code, but I get "£" coming out literally in the
    % output.

    Leaving aside whether you should care or not, have you set the encoding
    to iso-8859-1? If you use the default (utf-8), you won't get a single
    character in any case.
    --

    Patrick TJ McPhee
    East York Canada
     
    Patrick TJ McPhee, Oct 14, 2003
    #8
  9. "Patrick TJ McPhee" <> schrieb im Newsbeitrag
    news:bmhc03$plh$...
    > In article <bmh6ai$sb4$>,
    > Vic Russell <> wrote:
    >
    > % I know this is the code, but I get "£" coming out literally in the
    > % output.
    >
    > Leaving aside whether you should care or not, have you set the encoding
    > to iso-8859-1? If you use the default (utf-8), you won't get a single
    > character in any case.


    He will still get a single *character*. However, it will be represented by
    more than one *byte*.
     
    Julian F. Reschke, Oct 14, 2003
    #9
  10. In article <bmhi3n$mffr1$-berlin.de>,
    Julian F. Reschke <> wrote:
    % "Patrick TJ McPhee" <> schrieb im Newsbeitrag
    % news:bmhc03$plh$...
    % > In article <bmh6ai$sb4$>,
    % > Vic Russell <> wrote:
    % >
    % > % I know this is the code, but I get "£" coming out literally in the
    % > % output.
    % >
    % > Leaving aside whether you should care or not, have you set the encoding
    % > to iso-8859-1? If you use the default (utf-8), you won't get a single
    % > character in any case.
    %
    % He will still get a single *character*. However, it will be represented by
    % more than one *byte*.

    Depends what you mean by a byte. Why not call it an octet if you want
    to be anal about it?


    --

    Patrick TJ McPhee
    East York Canada
     
    Patrick TJ McPhee, Oct 15, 2003
    #10
  11. "Patrick TJ McPhee" <> schrieb im Newsbeitrag
    news:bmjmqv$l7e$...
    > In article <bmhi3n$mffr1$-berlin.de>,
    > Julian F. Reschke <> wrote:
    > % "Patrick TJ McPhee" <> schrieb im Newsbeitrag
    > % news:bmhc03$plh$...
    > % > In article <bmh6ai$sb4$>,
    > % > Vic Russell <> wrote:
    > % >
    > % > % I know this is the code, but I get "£" coming out literally in

    the
    > % > % output.
    > % >
    > % > Leaving aside whether you should care or not, have you set the

    encoding
    > % > to iso-8859-1? If you use the default (utf-8), you won't get a single
    > % > character in any case.
    > %
    > % He will still get a single *character*. However, it will be represented

    by
    > % more than one *byte*.
    >
    > Depends what you mean by a byte. Why not call it an octet if you want
    > to be anal about it?


    I could.

    The issue is that a lot of the confusion about encodings is caused because
    people do not grasp that a character is not a byte or an octet. Thus it
    makes a lot of sense to get people to use the right terminology.
     
    Julian F. Reschke, Oct 15, 2003
    #11
  12. Vic Russell

    Vic Russell Guest

    Fixed it!! Thanks for all the clues.

    I used:-
    $xmldoc->setEncoding('UTF-8');

    with LibXML and the good old British pound (£) symbol came out a treat.
    There is life in the old dog yet!

    Thanks again,

    Vic

    "Patrick TJ McPhee" <> wrote in message
    news:bmhc03$plh$...
    > In article <bmh6ai$sb4$>,
    > Vic Russell <> wrote:
    >
    > % I know this is the code, but I get "£" coming out literally in the
    > % output.
    >
    > Leaving aside whether you should care or not, have you set the encoding
    > to iso-8859-1? If you use the default (utf-8), you won't get a single
    > character in any case.
    > --
    >
    > Patrick TJ McPhee
    > East York Canada
    >
     
    Vic Russell, Oct 15, 2003
    #12
  13. In article <bmjn4n$n56q2$-berlin.de>,
    Julian F. Reschke <> wrote:

    % The issue is that a lot of the confusion about encodings is caused because
    % people do not grasp that a character is not a byte or an octet.

    Having dealt with people who are confused about encodings for more than
    a decade, I'd say the confusion about encodings is caused by the almost
    infinite and unquestionably needless variety of the things. The amount
    of storage space used to represent each code point has nothing at all
    to do with it.

    As for using the `correct' words, I'm not convinced that imposing an
    orthodoxy that goes against wide-spread usage is a good way to promote
    understanding. A lot of meaning in English depends on context, and it's
    irritating when people go around `correcting' completely unambiguous
    statements because they think a word has some sacred meaning.
    --

    Patrick TJ McPhee
    East York Canada
     
    Patrick TJ McPhee, Oct 16, 2003
    #13
  14. "Patrick TJ McPhee" <> schrieb im Newsbeitrag
    news:bmmb3e$ii4$...
    > In article <bmjn4n$n56q2$-berlin.de>,
    > Julian F. Reschke <> wrote:
    >
    > % The issue is that a lot of the confusion about encodings is caused

    because
    > % people do not grasp that a character is not a byte or an octet.
    >
    > Having dealt with people who are confused about encodings for more than
    > a decade, I'd say the confusion about encodings is caused by the almost
    > infinite and unquestionably needless variety of the things. The amount
    > of storage space used to represent each code point has nothing at all
    > to do with it.
    >
    > As for using the `correct' words, I'm not convinced that imposing an
    > orthodoxy that goes against wide-spread usage is a good way to promote
    > understanding. A lot of meaning in English depends on context, and it's
    > irritating when people go around `correcting' completely unambiguous
    > statements because they think a word has some sacred meaning.


    Well, I have to disagree.

    A character is not the same thing as a byte or a octet. It may be *encoded*
    as one byte.

    Most of the time when people are surprised by how UTF-8 works they think
    they see multiple characters. However, what they really see is a single
    character that is encoded into multiple bytes. The confusion is caused by
    using the wrong tool to look at the byte stream (for instance an editor that
    doesn't handle UTF-8), or using the right tool, but the encoding
    meta-information was lost (such as when UTF-8 encoded content is sent to a
    browser, but the content-type is wrong).

    Do you really think that trying to explain this won't help?
     
    Julian F. Reschke, Oct 16, 2003
    #14
  15. In article <bmmcfp$ota2i$-berlin.de>,
    Julian F. Reschke <> wrote:

    [...]

    % Do you really think that trying to explain this won't help?

    It really depends on the context. Most of the time, it doesn't, because
    an unsurprisingly large part of the population doesn't much care. For
    instance, without waiting to see how this thread turned out, the OP
    has evidently solved his problem and got on with his life.




    --

    Patrick TJ McPhee
    East York Canada
     
    Patrick TJ McPhee, Oct 17, 2003
    #15
    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. Tan
    Replies:
    1
    Views:
    510
  2. Mark Rae
    Replies:
    0
    Views:
    863
    Mark Rae
    Mar 14, 2006
  3. Ian Gregory
    Replies:
    1
    Views:
    507
  4. Olav
    Replies:
    3
    Views:
    4,250
  5. muldoon
    Replies:
    114
    Views:
    2,872
    Dennis Lee Bieber
    Oct 16, 2005
Loading...

Share This Page