473,407 Members | 2,306 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,407 software developers and data experts.

iconv or xmlsimpledocument with windows-1250

Does anyone has any experience with these two, I've lost a s**tload of
time trying to make them work with a well formed xml document encoded in
windows-1250 encoding, but simplexml works only with utf-8 and
iso-8859-1 and iconv-ing the string with original xml in it
($isostr=iconv('WINDOWS-1250', 'ISO-8859-1', $winstr);) before xml
parsing did no good (illegal characters, which i could //IGNORE or
//TRANSLIT but then I would loose characters that I needed in a first
place). Finally I ended up writing my own parsing routine for that
particular xml file. Damn, and I hoped that I could use these cool new
xml parsing capabilities that were so hyped in php5 (the language in
question is php 5.0.4)

Any ideas?
--

B.r.K.o.N.j.A = Bionic Robotic Knight Optimized for Nocturnal Judo and
Assasination
Aug 8 '06 #1
4 5160

B.r.K.o.N.j.A wrote:
Does anyone has any experience with these two, I've lost a s**tload of
time trying to make them work with a well formed xml document encoded in
windows-1250 encoding, but simplexml works only with utf-8 and
iso-8859-1 and iconv-ing the string with original xml in it
($isostr=iconv('WINDOWS-1250', 'ISO-8859-1', $winstr);) before xml
parsing did no good (illegal characters, which i could //IGNORE or
//TRANSLIT but then I would loose characters that I needed in a first
place). Finally I ended up writing my own parsing routine for that
particular xml file. Damn, and I hoped that I could use these cool new
xml parsing capabilities that were so hyped in php5 (the language in
question is php 5.0.4)

Any ideas?
--

B.r.K.o.N.j.A = Bionic Robotic Knight Optimized for Nocturnal Judo and
Assasination
Hello,

As far as I can tell from your post, it seems you're converting to
wrong charset. ISO-8859-1 (Latin-1) can't handle the characters you
need - my guess is that you need Serbian latin. Try iconv- ing the
string to UTF-8.

Vladislav

Aug 9 '06 #2
Hello,

As far as I can tell from your post, it seems you're converting to
wrong charset. ISO-8859-1 (Latin-1) can't handle the characters you
need - my guess is that you need Serbian latin. Try iconv- ing the
string to UTF-8.

Vladislav
Allready did that and it worked fine as expected (WIN-1250 -ISO-8859-1
was a gross oversight on my part... :)) Anyway, if anyone can use this:
When simplexml-ing a xml file that's not in ISO-8859-1 or UTF-8 (and
that xml file has encoding tag within), simplexml internally converts it
to utf-8 and returns utf-8 data (which started my problem since I
believed that I'm getting win-1250 data as stated in xml document... and
things just took from there ... :))

Thx,

P.S. I was actually needin' Croatian latin (though it's *exactly* the
same as Serbian one, you wouldn't make a lot of friends here calling it
Serbian :)))

--

B.r.K.o.N.j.A = Bionic Robotic Knight Optimized for Nocturnal Judo and
Assasination
Aug 9 '06 #3

B.r.K.o.N.j.A wrote:
Hello,

As far as I can tell from your post, it seems you're converting to
wrong charset. ISO-8859-1 (Latin-1) can't handle the characters you
need - my guess is that you need Serbian latin. Try iconv- ing the
string to UTF-8.

Vladislav

Allready did that and it worked fine as expected (WIN-1250 -ISO-8859-1
was a gross oversight on my part... :)) Anyway, if anyone can use this:
When simplexml-ing a xml file that's not in ISO-8859-1 or UTF-8 (and
that xml file has encoding tag within), simplexml internally converts it
to utf-8 and returns utf-8 data (which started my problem since I
believed that I'm getting win-1250 data as stated in xml document... and
things just took from there ... :))

Thx,

P.S. I was actually needin' Croatian latin (though it's *exactly* the
same as Serbian one, you wouldn't make a lot of friends here calling it
Serbian :)))

--

B.r.K.o.N.j.A = Bionic Robotic Knight Optimized for Nocturnal Judo and
Assasination
:) Yeah, I get that ... Just wanted to help, no insult intended.

Aug 9 '06 #4
>
:) Yeah, I get that ... Just wanted to help, no insult intended.
No, no, don't get me wrong, I would never take it as an insult (nor
would anyone who is not a complete idiot) :) just wanted to point out
that there are people who might begin an argument on "...how and why
it's not the same in the great scheme of things..." while the alphabet
itself (latin one) *is* letter for letter the same which would to
someone outside look really surreal. Absurd sh*t... :)

Btw, thx for the help, that would be exactly what I needed.

--

B.r.K.o.N.j.A = Bionic Robotic Knight Optimized for Nocturnal Judo and
Assasination
Aug 9 '06 #5

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

Similar topics

3
by: Erik Neves | last post by:
I need help with utf-8 before i go bald and the rest of my hair turns white! Platform: Mac OS X 10.2.6 Safari 1.0 (v85) Internet Explorer:mac 5.2.3 (5815.1) Apache 2.0.47 PHP 4.3.2 (Apache 2...
3
by: pbuchheit | last post by:
I need to convert Japanese characters to UTF-8. I tried using this command on a PHP 5.0.3 server: $out = iconv("iso-2022-jp", "utf-8", $in); But it does not work. Can anyone tell me what I'm doing...
1
by: Al | last post by:
Hi Folks, I am trying to run a script which is installed on a web server that I do not own or administer. The script relates to a emailing list. When I go to send an email I get the...
1
by: Strong IsOnlyWord | last post by:
I find a problem: Now when i input some special word in browser ,the Apache will report the error. My Apache error_log: python: ../iconv/skeleton.c:324: __gconv_transform_utf8_internal:...
1
by: yong | last post by:
I want to use iconv.h to convert some text to another charset. The code is below: ====== #include <stdio.h> #include <stdlib.h> #include <iconv.h> int main()
3
by: s_emiliano | last post by:
I am trying to get " feed to javascript" (http://jade.mcli.dist.maricopa.edu/feed/index.php) to run on my windows 2003 server. The testing script that they they provide gives this error when run:...
2
by: kkadrese | last post by:
hello group, I cannot figure out how to use iconv to "normalize" characters specific to some language. I need it in file upload where I take a file from local disc and then save to server and...
5
by: kp | last post by:
Hi, I am compiling on an AIX 5.1 box and my test machine is AIX 5.3. I run the foll. steps for compiling my test binary "test" /usr/vacpp/bin/xlC test.c -c -o test.o -I/home/jag/progs/include...
1
hadi00
by: hadi00 | last post by:
Hey there, first of all I don't know if this is the best forum to best my question in , if it's not, am sorry a lot. Secondly; I want anyone uses Iconv System tool on "win xp sp2 os",plz to help me...
5
by: jimmyg123 | last post by:
Hey everyone, Sorry for a question on an outdated PHP, but I am trying to get iconv working on php4.3.3. When I enable it in php.ini by removing the ; from the ;extension=php_iconv.dll line, php...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
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.