Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

332
Views
¿Por qué mb_convert_encoding agrega un signo de interrogación?

Por qué

 $output = '<hello'; echo mb_convert_encoding( $output, 'UTF-16', 'UTF-8' );

muestra

 <�hello

Yo estaba esperando

 <hello

¿Algunas ideas?

Editar: parece relacionado con el navegador porque funciona en la línea de comandos. Pero sigo sin entender...

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

$ echo '<hello' | od -x 0000000 683c 6c65 6f6c 000a 0000007
 $ php -v PHP 7.3.11 (cli) (built: Jun 5 2020 23:50:40) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.3.11, Copyright (c) 1998-2018 Zend Technologies $ cat hoge.php <?php $output = '<hello'; echo mb_convert_encoding( $output, 'UTF-16', 'UTF-8' ); $ php hoge.php | od -x 0000000 3c00 6800 6500 6c00 6c00 6f00 0000014

Lo intenté. ¿Está bien?

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!