HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: can not convert UTF-8 to US-ASCII HPUX
Operating System - HP-UX
1833802
Members
2550
Online
110063
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2006 01:52 AM
10-12-2006 01:52 AM
Hi,
I have a html file, which I need to read into the erp.
The html file is UTF-8 format. I try to change to ascii for reading in
I always get error message:
can not convert UTF-8 to US-ASCII
what do I need to convert
OS: HPUX 11.11
I have a html file, which I need to read into the erp.
The html file is UTF-8 format. I try to change to ascii for reading in
I always get error message:
can not convert UTF-8 to US-ASCII
what do I need to convert
OS: HPUX 11.11
live is great !!
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2006 09:42 AM
10-12-2006 09:42 AM
Solution
You left out one important thing: what's the name of the conversion tool you're using?
UTF-8 is much "larger" character set than US-ASCII. If the UTF-8 file uses any of those characters that are outside US-ASCII, it is not possible to convert those characters into a single-USASCII-character units without losing information. This may be why your conversion tool is refusing to work.
(Let's see whether this forum can handle UTF-8...)
For example, here's the Euro sign: "â ¬".
As UTF-8, it is a single character. But when you convert it to US-ASCII, there just isn't any equivalent available. Some possible methods are:
- Convert a single UTF-8 character to a suitable multi-character representation: "â ¬" might become "EUR". This will lengthen some lines and may screw up the alignment of columns. In some cases this is not acceptable, so a generic conversion program cannot do this unless given an explicit permission to do so.
- Convert it to the closest possible single-character look-alike: "â ¬" becomes "E". This will make the conversion non-reversible: some information is lost. This is not acceptable in all cases either.
- Discard the characters that cannot be converted: this will *definitely* lose information, so it is acceptable in special cases only.
If you're using GNU "recode" utility to do the conversion, it needs a "-f" option to allow non-reversible conversions. You can also choose what happens to characters that cannot be converted: read the documentation of "recode" for details. (GNU recode is available in the HP-UX Porting Archive.)
If you're using some other tool for the conversion, you may need to do something similar.
UTF-8 is much "larger" character set than US-ASCII. If the UTF-8 file uses any of those characters that are outside US-ASCII, it is not possible to convert those characters into a single-USASCII-character units without losing information. This may be why your conversion tool is refusing to work.
(Let's see whether this forum can handle UTF-8...)
For example, here's the Euro sign: "â ¬".
As UTF-8, it is a single character. But when you convert it to US-ASCII, there just isn't any equivalent available. Some possible methods are:
- Convert a single UTF-8 character to a suitable multi-character representation: "â ¬" might become "EUR". This will lengthen some lines and may screw up the alignment of columns. In some cases this is not acceptable, so a generic conversion program cannot do this unless given an explicit permission to do so.
- Convert it to the closest possible single-character look-alike: "â ¬" becomes "E". This will make the conversion non-reversible: some information is lost. This is not acceptable in all cases either.
- Discard the characters that cannot be converted: this will *definitely* lose information, so it is acceptable in special cases only.
If you're using GNU "recode" utility to do the conversion, it needs a "-f" option to allow non-reversible conversions. You can also choose what happens to characters that cannot be converted: read the documentation of "recode" for details. (GNU recode is available in the HP-UX Porting Archive.)
If you're using some other tool for the conversion, you may need to do something similar.
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2006 02:55 AM
10-16-2006 02:55 AM
Re: can not convert UTF-8 to US-ASCII HPUX
Hi,
thanks a mill for your solution.
I already solved it.
Barbara
thanks a mill for your solution.
I already solved it.
Barbara
live is great !!
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP