2

Here is an example:

PHP:

<?php
echo "ção";
?>

Git Bash:

$ php a.php
ção

Note: I'm writing a text-console application for Windows.

15
  • 6
    character sets. your terminal is probably set to a diff charset than whatever charset those chars were written into the file as. Commented Apr 20, 2015 at 21:20
  • Could You provide source of a.php converted to HEX and encoding used by Your console? Commented Apr 20, 2015 at 21:23
  • @Michas 3c3f7068700d0a6563686f2022e7e36f223b0d0a3f3e . I'm on Git Bash, I read it's already working with UTF-8. Commented Apr 20, 2015 at 21:31
  • @MarcB Any idea how to find out what that charset is? The terminal is of Git Bash. Commented Apr 20, 2015 at 21:33
  • 1
    @PedroSobota for the difference between the two "Git for Windows", see stackoverflow.com/a/17810334/6309 and stackoverflow.com/a/784743/6309, and stackoverflow.com/a/3144417/6309. Commented Apr 22, 2015 at 17:05

1 Answer 1

0

The bash console has changed with the more recent msys2-based (64-bits) Git For Windows 2.3.5

The OP reports:

I went ahead and uninstalled msysgit and installed git-for-windows and the problem is solved, although the Git Bash is a little different..

That more recent version of Git For Windows includes all the latest utf-8 support improvements and a bash 4.3.33 2013 (vs. a bash 3.1.20 2005)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.