Languages and Scripting
Showing results for 
Search instead for 
Do you mean 

UTF-8 problem with XML files

SOLVED
Go to Solution
Highlighted
Frequent Advisor

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.
6 REPLIES
Honored Contributor [Founder]

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

Re: UTF-8 problem with XML files

Can I use iconv instead in a more easy way?
Honored Contributor [Founder]

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 [Founder]

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

Re: UTF-8 problem with XML files

Dear Peter,
We used iconv finall, and seems to work fine.
Geogre.
Frequent Advisor

Re: UTF-8 problem with XML files

ok.