logo       


Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

wxInputStream and multibyte character sets: msg#00020

Subject: wxInputStream and multibyte character sets
Hi,

I have a problem with module Wx::Perl::ProcessStream.
This reads the STDOUT from an external process executed using Wx::Process and 
Wx::ExecuteCommand.

To do this it, it does a 'readline' on the wxInputStream available via 
Wx::Process.

My problem is that the implementation of READLINE in Wx::InputStream works as 
follows:

read a char from the stream
append char to a wxString
return wxString if char == '\n'


This appears not to work if the output stream from the external process is, for 
example, UTF-8.

I *think* what perhaps should happen is

read a char from the stream
add it to a charbuffer
if char == '\n' {
    convert charbuffer to a wxString ( method determined by wxWidgets 
unicode/ansi build macros )
    return wxString
}

Alas, my C is too poor to implement / test this (I've tried :-(  ) - I suspect 
it would be v.simple for anyone with adequate C skills.

I have a workaround for the Wx::Perl::ProcessStream module. In that I have 
stopped using readline and do 'read's on the wxInputStream in a perl loop with 
localised byte mode.

This seems to work.

I'm not sure if Wx::InputStream::READLINE needs changing or not. Any thoughts?


Mark









-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/


Ruby Jobs
Java Jobs
Jobs in California
more...
what
job title, keywords
where
city, state, zip
jobs by job search
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
db.firebase.por...    text.xml.xalan....    qnx.openqnx.dev...    user-groups.zar...    internationaliz...    kde.devel.konve...    finance.e-gold....    emacs.latex.pre...    gis.therion/200...    web.webmin.gene...    yellowdog.gener...    vserver/2003-08...    redhat.release....    sysutils.tivoli...    xfree86.expert/...    mail.becky.user...    hardware.netapp...    netbsd.ports.xe...    python.distutil...    boot-loaders.gr...    culture.interne...    java.springfram...    activedir/2006-...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe