UTF-8 problem with XML files (174 Views)
Reply
Frequent Advisor
George_206
Posts: 41
Registered: ‎04-24-2005
Message 1 of 7 (174 Views)
Accepted Solution

UTF-8 problem with XML files

We have an HP 9000 server running HP 11.0.

We have a problem with some xml files, that are created automatically from an application, but are not saved in UTF-8 encoding. Unfortunatelly, we do cannot modify the application.

So, we download them using ftp, edit them with notepad and save them as utf-8. Then we upload them to HP-UX and they are ok.

Can anyone suggest any script for automatic conversion to UTF-8 inside the HP-UX, instead of the manually procedure?

Thanks,
George.
Please use plain text.
Honored Contributor
Peter Godron
Posts: 4,470
Registered: ‎02-13-2002
Message 2 of 7 (174 Views)

Re: UTF-8 problem with XML files

George,
you have missed out a very important point: What is the original format ?

At this point I can only suggest GNU recode, av ailable free in HPUX porting Archive.
http://hpux.connect.org.uk/hppd/hpux/Gnu/recode-3.6/



Please use plain text.
Frequent Advisor
George_206
Posts: 41
Registered: ‎04-24-2005
Message 3 of 7 (174 Views)

Re: UTF-8 problem with XML files

Can I use iconv instead in a more easy way?
Please use plain text.
Honored Contributor
Peter Godron
Posts: 4,470
Registered: ‎02-13-2002
Message 4 of 7 (174 Views)

Re: UTF-8 problem with XML files

George,
sorry, I assumed you had already looked at iconv.

If iconv can handle the input and output character set then yes, use iconv as per example on man page.
"iconv -f -t foo > bar"

Please use plain text.
Honored Contributor
Peter Godron
Posts: 4,470
Registered: ‎02-13-2002
Message 5 of 7 (174 Views)

Re: UTF-8 problem with XML files

George,
how are you getting on with this problem ?
Did my suggestions help ?

If this problem is fixed, could you please complete the thread by awarding points to helpful answers and summarising the solution for you.

This will help resolution of similar problems in the future.
Please use plain text.
Frequent Advisor
George_206
Posts: 41
Registered: ‎04-24-2005
Message 6 of 7 (174 Views)

Re: UTF-8 problem with XML files

Dear Peter,
We used iconv finall, and seems to work fine.
Geogre.
Please use plain text.
Frequent Advisor
George_206
Posts: 41
Registered: ‎04-24-2005
Message 7 of 7 (174 Views)

Re: UTF-8 problem with XML files

ok.
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation