UTF-8 problem with XML files (205 Views)
Reply
Frequent Advisor
George_206
Posts: 41
Registered: ‎04-24-2005
Message 1 of 7 (205 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.
Honored Contributor
Peter Godron
Posts: 4,470
Registered: ‎02-13-2002
Message 2 of 7 (205 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/



Frequent Advisor
George_206
Posts: 41
Registered: ‎04-24-2005
Message 3 of 7 (205 Views)

Re: UTF-8 problem with XML files

Can I use iconv instead in a more easy way?
Honored Contributor
Peter Godron
Posts: 4,470
Registered: ‎02-13-2002
Message 4 of 7 (205 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"

Honored Contributor
Peter Godron
Posts: 4,470
Registered: ‎02-13-2002
Message 5 of 7 (205 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.
Frequent Advisor
George_206
Posts: 41
Registered: ‎04-24-2005
Message 6 of 7 (205 Views)

Re: UTF-8 problem with XML files

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

Re: UTF-8 problem with XML files

ok.
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.