- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- ICONV returns empty output buffer
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
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
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- 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
тАО05-10-2007 09:53 PM
тАО05-10-2007 09:53 PM
ICONV returns empty output buffer
I have another question. I'm probably doing something stupid but...
I have the internationalization kit installed, so I have all the .ICONV files.
I'm reading a UTF-8 encoded message, which I try to converted using iconv.
However the output buffer after calling iconv contains nothing, but the inbytesleft is 0, so all characters should have been converted.
Regards
Rakesh
- Tags:
- IConv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-10-2007 11:49 PM
тАО05-10-2007 11:49 PM
Re: ICONV returns empty output buffer
Most likely, the code has an error. Without the code, any comments would be pure random speculation.
Please post a code segment that reproduces the problem that you are encountering. Before posting the code segment, please verify that the code segment is complete (e.g., it compiles, links, and produces the reported problem when executed).
- Bob Gezelter, http://www.rlgsc.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-11-2007 01:02 AM
тАО05-11-2007 01:02 AM
Re: ICONV returns empty output buffer
It took a couple of reads through the C environment to get the hang of wide characters and UTC stuff.
I'd expect there are examples of using these calls available. And there are ports of libiconv available from various sources, as well.
Here's an earlier discussion:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=726740
There are also ports of libxml2 around, and xml can help deal with file structuring and "weird" data.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-11-2007 02:18 AM
тАО05-11-2007 02:18 AM
Re: ICONV returns empty output buffer
I'm reading a message from MQ queue. The message is an UTF-8 xml message.
I have the following...
Call iconv_open
iconv_struct = iconv_open("ISO8859-1", "UTF-8");
Then I have my input message from MQ
char *input
size_t len = strlen(input);
char* outbuf = calloc(sizeof(char),len*2);
size_t outlen = len*2;
if(iconv(iconv_struct,&input,&len,&outbuf,&outlen) != 0)
{
printf("error\n");
}
else
{
printf("Success\n");
printf("[%s]\n",outbuf);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-11-2007 02:54 AM
тАО05-11-2007 02:54 AM
Re: ICONV returns empty output buffer
I'd probably use libxml2 to read and process it. There's a port of libxml2 on the Freeware distro; it's the version that was current with the Freeware V8 distro.
There's certainly more information here, but still not enough to go on. In particular, we're going to need a little data, and it would be best to attach a text file (mumble.txt) to a reply here, with a full standalone example of your failing C code and a line or two of the UTF-8 text you're working with.
The other option is to call in some help with this sort of thing, as I'm guessing you're on a schedule to get this done.
Stephen Hoffman
HoffmanLabs.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-11-2007 03:01 AM
тАО05-11-2007 03:01 AM
Re: ICONV returns empty output buffer
I'll try and get a simple example application done for monday. I'll also attach a file created from the UTF-8 message written by MQ.
I also look into lib2xml
thanks again
Rakesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-14-2007 01:01 AM
тАО05-14-2007 01:01 AM
Re: ICONV returns empty output buffer
I've tried using lib2xml and I still get an empty output buffer.
Attached is an example program source and a test file to decode.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-14-2007 01:02 AM
тАО05-14-2007 01:02 AM
Re: ICONV returns empty output buffer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-14-2007 02:01 AM
тАО05-14-2007 02:01 AM