0

I'm trying the straightforward way and am getting garbled text:

Note: I am on Windows 8.1.

PHP

<?php
$db = new SQLite3(__DIR__ . "/txttest.db");
$db->exec("CREATE TABLE IF NOT EXISTS txttest (txt TEXT)");

$db->exec("DELETE FROM txttest");

$text = "ção";

$stmt = $db->prepare("INSERT INTO txttest (txt) VALUES (?)");
$stmt->bindParam(1, $text, SQLITE3_TEXT);
$stmt->execute();
?>

Git Bash

sqlite> select * from txttest;
ção

Edit: It was actually not related to sqlite3 but Git Bash: Why does Git Bash not display my PHP strings correctly?

Community
  • 1
  • 1
Pedro OS
  • 1,383
  • 1
  • 12
  • 15

0 Answers0