Skip to content

Escapeshellcmd ignores non asci chars and japanese chars with debian 12 and php 8.2.26 #17143

@AbhilashKyatham

Description

@AbhilashKyatham

Description

The following code:

if (false == setlocale(LC_CTYPE, "en_US.UTF-8")) {
	    $aLogger->err( "failed locale ");
	}
	// prepare the escaped string
	//$escapedArgs = utf8SafeEscapeShellCmd($args);//working
	$escapedArgs = escapeshellcmd($args);
<?php

Resulted in this output:

ignores non ascii chars and Japanese chars

But I expected this output instead:

it should handle all the chars.same code  is working fine in debian 9 and php 7.0.33

PHP Version

PHP 8.2.26

Operating System

debian 12

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions