Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7704777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T23:45:26+00:00 2026-05-31T23:45:26+00:00

C:\Users\Kolink>php -r echo ‘é’; Ú C:\Users\Kolink>echo é é As you can see, a program

  • 0
C:\Users\Kolink>php -r "echo 'é';"
Ú

C:\Users\Kolink>echo é
é

As you can see, a program outputting an é results in a Ú, but using the echo command gives the desired character.

And, can I configure PHP (maybe some command at the start of the script) to output the correct character?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T23:45:27+00:00Added an answer on May 31, 2026 at 11:45 pm

    CMD.exe works in a different codepage than PHP. By the way, it is also a different codepage than the default Windows codepage. This is for compatibility with older MS-DOS programs. In my country Windows uses Windows-1250 and cmd.exe uses DOS Latin2. I suppose in the UK this would be Windows-1252 and DOS Latin1 respectively.

    To get the same results you have to use the same codepage in PHP and in cmd.exe. Check what codepage is used by PHP and set cmd.exe to the same codepage. To do this, use the following command: mode con cp select=<codepagenumber> or chcp <codepagenumber>. This will change the codepage only for the current instance of cmd.exe.

    Here is a short list of some typical codepages and their numbers:

    DOS Latin1    850
    DOS Latin2    852
    Windows-1250  1250
    Windows-1252  1252
    UTF-8         65001
    ISO-8859-1    28591
    ISO-8859-2    28592
    

    As @Christophe Weis pointed out in comments, you can lookup the identifiers of other code pages at Code page identifiers page.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Users on my site can post news items. But right now, it's all honor
Users can sketch in my app using a very simple tool (move mouse while
Users sometimes input some emoji in my BBS, but I am using MySQL version
Users on my site can add nodes of a custom type (let's call it
Users can easily rename special folders like Computer, Network etc. to whatever they like.
Users of my program are organized hierarchically. Each user is a node in a
Users on my site are shown a list of items. The list they see
users_allowed_to_be_viewed.map {|u| #{u.id},} but that gives 1,2,3, What would be a short way to
Users can upload files to the server, which are stored effectively forever. I want
Users can do advanced searches (they are many possible parameters): /search/?query=toto&topic=12&minimumPrice=0&maximumPrice=1000 I would like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.