Home  >  Article  >  Backend Development  >  Can't input Chinese characters in php cli?

Can't input Chinese characters in php cli?

WBOY
WBOYOriginal
2016-08-18 09:16:201458browse

My system: debian8+php
Under dbeian8, you can use lxdterminal to input and display Chinese characters, that is, you can input and display Chinese characters in bash

Can't input Chinese characters in php cli?

Chinese characters can also be input and displayed in the python shell
Can't input Chinese characters in php cli?

Chinese characters can be displayed in php cli (or php shell, or interactive mode), but Chinese characters cannot be input.
php -a
Interactive mode enabled

php > echo pack("H12","E4B8ADE69687");
Chinese
can display Chinese characters.

Unable to enter Chinese characters.
Can't input Chinese characters in php cli?
I click the enter key or select 1, but Chinese characters cannot be input into it.

Excuse me, how to solve it?

Reply content:

My system: debian8+php
Under dbeian8, you can use lxdterminal to input and display Chinese characters, that is, you can input and display Chinese characters in bash

Can't input Chinese characters in php cli?

Chinese characters can also be input and displayed in the python shell
Can't input Chinese characters in php cli?

Chinese characters can be displayed in php cli (or php shell, or interactive mode), but Chinese characters cannot be input.
php -a
Interactive mode enabled

php > echo pack("H12","E4B8ADE69687");
Chinese
can display Chinese characters.

Unable to enter Chinese characters.
Can't input Chinese characters in php cli?
I click the enter key or select 1, but Chinese characters cannot be input into it.

Excuse me, how to solve it?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn