Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I am using a "C" executable in order to retrieve the nickname of a particular user from a database. The "C" executable returns the nickname correctly. The PHP code prints later the variable "nickname" correctly. However I observed that if the end of the returned "C" output contains one or more Omega Greek characters, then it seems that value which is assigned to the "nickname" variable contains all returned characters except the Omega characters at the end of the string!... Note that if e.g. an Omega character exists inside the returned string (i.e. not at the end of the string), is not deleted... Keep in mind that the "C" program runs ok. That is, running it with Omega at the end, the output is ok. In the following part of the code, the zlog is a method for logging / output.Code: Select all
$thecommand = "getUsernameC " . $thesender ;
$nickname = system($thecommand) ;
if (strlen($nickname) > 1)
{
zlog("Msisdn: $thesender is registered...Continue processing") ;
zlog("The nickname is $nickname") ;
$userOk = 1 ;
}Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]