FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Xml Loading special Characters
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Xml Loading special Characters [message #183243] Mon, 14 October 2013 16:44 Go to next message
frank.catry is currently offline  frank.catry
Messages: 9
Registered: October 2013
Karma: 0
Junior Member
http://services.mobile.de/1.0.0/refdata/sites/GERMANY/classes/AgriculturalV ehicle/makes

In the textContext of this XML i find some special characters like ë en ö.
Example : 'Düvelsdor'

However 'Düvelsdor' results in Dücker' when loading the XML a new DOMDocument()

Do anybody knows a solution for this problem ?
Frank.
Re: Xml Loading special Characters [message #183244 is a reply to message #183243] Mon, 14 October 2013 18:07 Go to previous messageGo to next message
Luuk is currently offline  Luuk
Messages: 329
Registered: September 2010
Karma: 0
Senior Member
On 14-10-2013 18:44, Frank Catry wrote:
> http://services.mobile.de/1.0.0/refdata/sites/GERMANY/classes/AgriculturalV ehicle/makes
>
> In the textContext of this XML i find some special characters like ë en ö.
> Example : 'Düvelsdor'
>
> However 'Düvelsdor' results in Dücker' when loading the XML a new DOMDocument()
>
> Do anybody knows a solution for this problem ?
> Frank.
>


The characters in an XML are (if not specified )UTF-8 encoded.

You could use a function like utf_decode to convert this to another
encoding, or you should be aware of this UTF8-encoding and handle them
correctly...

http://www.php.net/manual/en/function.utf8-decode.php
Re: Xml Loading special Characters [message #183245 is a reply to message #183243] Mon, 14 October 2013 18:29 Go to previous messageGo to next message
Peter H. Coffin is currently offline  Peter H. Coffin
Messages: 245
Registered: September 2010
Karma: 0
Senior Member
On Mon, 14 Oct 2013 09:44:09 -0700 (PDT), Frank Catry wrote:
> http://services.mobile.de/1.0.0/refdata/sites/GERMANY/classes/AgriculturalV ehicle/makes
>
> In the textContext of this XML i find some special characters like ë en ö.
> Example : 'Düvelsdor'
>
> However 'Düvelsdor' results in Dücker' when loading the XML a new DOMDocument()
>
> Do anybody knows a solution for this problem ?

I see you attempting to write this message in UTF-8 and your message
headers indicate that the text is supposed to be ISO 8859-1. If you
know what those are, then you should immediately understand what the
problem you are having is. If you don't know what those are, then
learning those things will show you the solution to your problem.

--
5. The artifact which is the source of my power will not be kept on the
Mountain of Despair beyond the River of Fire guarded by the Dragons
of Eternity. It will be in my safe-deposit box. The same applies to
the object which is my one weakness. --Peter Anspach "Evil Overlord"
Re: Xml Loading special Characters [message #183249 is a reply to message #183243] Tue, 15 October 2013 08:50 Go to previous messageGo to next message
frank.catry is currently offline  frank.catry
Messages: 9
Registered: October 2013
Karma: 0
Junior Member
Thanks Luuk, thats the function i needed. It works fine now. Frank.
Re: Xml Loading special Characters [message #183250 is a reply to message #183245] Tue, 15 October 2013 08:55 Go to previous messageGo to next message
frank.catry is currently offline  frank.catry
Messages: 9
Registered: October 2013
Karma: 0
Junior Member
To Peter H. Coffin; your contribution to this forum is not valuable. Please offers sulotions, don't act like a wiseacre. Frank.
Re: Xml Loading special Characters [message #183251 is a reply to message #183250] Tue, 15 October 2013 12:28 Go to previous messageGo to next message
Scott Johnson is currently offline  Scott Johnson
Messages: 196
Registered: January 2012
Karma: 0
Senior Member
On 10/15/2013 1:55 AM, Frank Catry wrote:
> To Peter H. Coffin; your contribution to this forum is not valuable. Please offers sulotions, don't act like a wiseacre. Frank.
>

+1
Re: Xml Loading special Characters [message #183252 is a reply to message #183250] Tue, 15 October 2013 12:44 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 10/15/2013 4:55 AM, Frank Catry wrote:
> To Peter H. Coffin; your contribution to this forum is not valuable. Please offers sulotions, don't act like a wiseacre. Frank.
>

Your response is completely off-target. Rather than just give you the
answer, Peter attempted to help you learn what your problem is. That
way the next time you have a similar problem, you have a better chance
of figuring things out for yourself.

But you obviously can not be bothered with spending some effort to learn
your job; you just want others to give you answers for free.

Unfortunately, you are not alone.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: Xml Loading special Characters [message #183254 is a reply to message #183250] Tue, 15 October 2013 14:57 Go to previous messageGo to next message
Peter H. Coffin is currently offline  Peter H. Coffin
Messages: 245
Registered: September 2010
Karma: 0
Senior Member
On Tue, 15 Oct 2013 01:55:23 -0700 (PDT), Frank Catry wrote:

> To Peter H. Coffin; your contribution to this forum is not valuable.
> Please offers sulotions, don't act like a wiseacre. Frank.

*shrug* Solutions don't fix the next problem. They only fix this
problem, and leave you sitting there, never knowing what part of the
"solution" actually made the difference. That's not helpful, to anyone,
long term. The simple fact is that you're going to need to understand
character sets and encodings sometime, they're 100% central to the
problem you're grappling with. It's time to put on real trousers and
tackle the whole concept because it won't take THAT much longer than
just trying to apply someone else's "solution".

--
"25 grams of wafers and 20 ml of wine undergo transubstantiation and
become the flesh and blood of our Lord. How many Joules of heat are
released by the transformation?" --Theological Physics exam, 1997
Re: Xml Loading special Characters [message #183255 is a reply to message #183243] Tue, 15 October 2013 15:45 Go to previous messageGo to next message
frank.catry is currently offline  frank.catry
Messages: 9
Registered: October 2013
Karma: 0
Junior Member
I knew the problem and spend a lot of time testing different PHP functions to solve the conversion. Thats all. I just needed a hint and that exactly what Luud did. I don't have to learn PHP because this is isolated job.

For free ? I already have helped dozens of people for free with a turnkey solution. I don't have a problem with free. F.
Re: Xml Loading special Characters [message #183256 is a reply to message #183254] Tue, 15 October 2013 17:31 Go to previous messageGo to next message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma: 0
Senior Member
Peter H. Coffin wrote:

> On Tue, 15 Oct 2013 01:55:23 -0700 (PDT), Frank Catry wrote:
>> To Peter H. Coffin; your contribution to this forum is not valuable.
>> Please offers sulotions, don't act like a wiseacre. Frank.
>
> *shrug* Solutions don't fix the next problem. They only fix this
> problem, and leave you sitting there, never knowing what part of the
> "solution" actually made the difference. That's not helpful, to anyone,
> long term. The simple fact is that you're going to need to understand
> character sets and encodings sometime, they're 100% central to the
> problem you're grappling with. It's time to put on real trousers and
> tackle the whole concept because it won't take THAT much longer than
> just trying to apply someone else's "solution".

+1


PointedEars
--
Anyone who slaps a 'this page is best viewed with Browser X' label on
a Web page appears to be yearning for the bad old days, before the Web,
when you had very little chance of reading a document written on another
computer, another word processor, or another network. -- Tim Berners-Lee
Re: Xml Loading special Characters [message #183257 is a reply to message #183255] Tue, 15 October 2013 17:32 Go to previous messageGo to next message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma: 0
Senior Member
Frank Catry wrote:

> I knew the problem and spend a lot of time testing different PHP functions
> to solve the conversion. Thats all. I just needed a hint and that exactly
> what Luud did. I don't have to learn PHP because this is isolated job.

<http://www.catb.org/~esr/faqs/smart-questions.html>

> For free ? I already have helped dozens of people for free with a turnkey
> solution. I don't have a problem with free. F.

Please go away. TIA.


PointedEars
--
Anyone who slaps a 'this page is best viewed with Browser X' label on
a Web page appears to be yearning for the bad old days, before the Web,
when you had very little chance of reading a document written on another
computer, another word processor, or another network. -- Tim Berners-Lee
Re: Xml Loading special Characters [message #184245 is a reply to message #183243] Mon, 16 December 2013 09:36 Go to previous messageGo to next message
Moon Elf is currently offline  Moon Elf
Messages: 6
Registered: December 2013
Karma: 0
Junior Member
On 2013-10-14, Frank Catry <frank(dot)catry(at)gmail(dot)com> wrote:
> http://services.mobile.de/1.0.0/refdata/sites/GERMANY/classes/AgriculturalV ehicle/makes
>
> In the textContext of this XML i find some special characters like ë en ö.
> Example : 'Düvelsdor'
>
> However 'Düvelsdor' results in Dücker' when loading the XML a new DOMDocument()
>
> Do anybody knows a solution for this problem ?
> Frank.

FYI, html pages can display UTF-XX but the browser needs to support it.

ME

--
Member of the DR rogue circle.
Search and you will find.
Re: Xml Loading special Characters [message #184250 is a reply to message #184245] Mon, 16 December 2013 12:34 Go to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 12/16/2013 4:36 AM, Moon Elf wrote:
> On 2013-10-14, Frank Catry <frank(dot)catry(at)gmail(dot)com> wrote:
>> http://services.mobile.de/1.0.0/refdata/sites/GERMANY/classes/AgriculturalV ehicle/makes
>>
>> In the textContext of this XML i find some special characters like ë en ö.
>> Example : 'Düvelsdor'
>>
>> However 'Düvelsdor' results in Dücker' when loading the XML a new DOMDocument()
>>
>> Do anybody knows a solution for this problem ?
>> Frank.
>
> FYI, html pages can display UTF-XX but the browser needs to support it.
>
> ME
>

Sure it can. But that has nothing to do with PHP.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Zip Codes ctype? Pregmatch?
Next Topic: How to code () inside quotes
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 10 11:49:14 GMT 2024

Total time taken to generate the page: 0.02857 seconds