473,406 Members | 2,439 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

LibXML and the British pound

Hi,

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

Vic
Jul 20 '05 #1
14 3235
"Vic Russell" <no****@nospam.com> schrieb im Newsbeitrag
news:bm**********@hercules.btinternet.com...
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?

Jul 20 '05 #2
<skip:sarcasm>maybe problem is that it's not british enough
=)</skip:sarcasm>
Jul 20 '05 #3
Euroverthetop there but thanks
"arachno" <bo******************@yahoo.com> wrote in message
news:bm************@ID-155519.news.uni-berlin.de...
<skip:sarcasm>maybe problem is that it's not british enough
=)</skip:sarcasm>

Jul 20 '05 #4
I know this is the code, but I get "£" coming out literally in the
output.
"Julian F. Reschke" <re*****@muenster.de> wrote in message
news:bm************@ID-98527.news.uni-berlin.de...
"Vic Russell" <no****@nospam.com> schrieb im Newsbeitrag
news:bm**********@hercules.btinternet.com...
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?

Jul 20 '05 #5
Vic Russell wrote:
"Julian F. Reschke" <re*****@muenster.de> wrote in message
news:bm************@ID-98527.news.uni-berlin.de...
"Vic Russell" <no****@nospam.com> schrieb im Newsbeitrag
news:bm**********@hercules.btinternet.com...
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.)

Jul 20 '05 #6
In article <bm**********@hercules.btinternet.com>,
Vic Russell <no****@nospam.com> 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!
Jul 20 '05 #7
In article <bm**********@hercules.btinternet.com>,
Vic Russell <no****@nospam.com> 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
pt**@interlog.com
Jul 20 '05 #8
"Patrick TJ McPhee" <pt**@interlog.com> schrieb im Newsbeitrag
news:bm**********@news.eusc.inter.net...
In article <bm**********@hercules.btinternet.com>,
Vic Russell <no****@nospam.com> 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*.
Jul 20 '05 #9
In article <bm************@ID-98527.news.uni-berlin.de>,
Julian F. Reschke <re*****@muenster.de> wrote:
% "Patrick TJ McPhee" <pt**@interlog.com> schrieb im Newsbeitrag
% news:bm**********@news.eusc.inter.net...
% > In article <bm**********@hercules.btinternet.com>,
% > Vic Russell <no****@nospam.com> 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
pt**@interlog.com
Jul 20 '05 #10

"Patrick TJ McPhee" <pt**@interlog.com> schrieb im Newsbeitrag
news:bm**********@news.eusc.inter.net...
In article <bm************@ID-98527.news.uni-berlin.de>,
Julian F. Reschke <re*****@muenster.de> wrote:
% "Patrick TJ McPhee" <pt**@interlog.com> schrieb im Newsbeitrag
% news:bm**********@news.eusc.inter.net...
% > In article <bm**********@hercules.btinternet.com>,
% > Vic Russell <no****@nospam.com> 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.

Jul 20 '05 #11
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" <pt**@interlog.com> wrote in message
news:bm**********@news.eusc.inter.net...
In article <bm**********@hercules.btinternet.com>,
Vic Russell <no****@nospam.com> 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
pt**@interlog.com

Jul 20 '05 #12
In article <bm************@ID-98527.news.uni-berlin.de>,
Julian F. Reschke <re*****@muenster.de> 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
pt**@interlog.com
Jul 20 '05 #13

"Patrick TJ McPhee" <pt**@interlog.com> schrieb im Newsbeitrag
news:bm**********@news.eusc.inter.net...
In article <bm************@ID-98527.news.uni-berlin.de>,
Julian F. Reschke <re*****@muenster.de> 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?

Jul 20 '05 #14
In article <bm************@ID-98527.news.uni-berlin.de>,
Julian F. Reschke <re*****@muenster.de> 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
pt**@interlog.com
Jul 20 '05 #15

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

114
by: muldoon | last post by:
Americans consider having a "British accent" a sign of sophistication and high intelligence. Many companies hire salespersons from Britain to represent their products,etc. Question: When the...
1
by: Vlajko Knezic | last post by:
Not so sure what is going on here but is something to do with the way UTF8 is handled in Perl and/or LibXML The sctript below: - accepts a value from a form text field; - ...
1
by: Ian Gregory | last post by:
Hi, One of our servers has recently been upgraded and as a result both libxml and XML::LibXML have been upgraded. The OS is OpenBSD 3.3. libxml has gone from version 2.4.18 to 2.5.7p1 and...
3
by: Generic Usenet Account | last post by:
The C/C++ libxml library from xmfsoft (www.xmlsoft.org ---- GNOME project) has in excess of 1000 APIs (http://www.xmlsoft.org/APIfunctions.html). This excessively high number of APIs is beyond...
3
by: Olav | last post by:
I need to do some cross-platform XML in C++. Previously I have used Xerces, but some Googeling indicated that many people prefer libxml. Also it is UTF-8, which is easier for us (Xerces is...
5
by: jwang | last post by:
I'm currently writing some C code that uses libxml. I've seen several example of parsing xml when the xml are in files. However, I would like to parse the xml from a char buffer. Currently I am ...
1
by: Mark Rae | last post by:
Hi, Suddenly (at least, I think so) when I rebuild a web deployment project in VS.NET 2005, it strips off British pound signs e.g. £10 becomes 10. Has anyone else seen this...? Is there a way...
0
by: Rich | last post by:
I am trying to obtain more debugging information for an issue I reported (ref. Bug #37185 <http://bugs.php.net/bug.php?id=37185&edit=2>). Unfortunately, I do not have access to the now-ancient...
0
by: kellner | last post by:
Hello, I'm parsing a chunk of XML code and would like to add attribute values to individual tags if these are lacking. This is with perl 5.8.6, libxml2 2.6.17, XML::LibXML 1.58. Basically, I...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.