0

I'm trying to use the ability to access Smartsheet data via the ODBC driver. http://smartsheet-platform.github.io/odbc-docs/ in php.

All is well, only the symbols on the Cyrillic are displayed by the question marks (????)

$conn = odbc_connect("Smartsheet","programmer*********","*****484");
if (!$conn)
    return;
$query = odbc_exec($conn, "SELECT * FROM Заказы__4654483440461700s_");
while ($row = odbc_fetch_array($query)) {
    $list[] = array_decode($row);
}   

debug query

mega6382
  • 9,211
  • 17
  • 48
  • 69
  • The Smartsheet ODBC driver should return UTF-8 data. In order to separate ODBC issues from PHP issues, can you try to pull the data into some app like Excel and see what the results are? – timwells Apr 09 '18 at 14:55
  • In excel, everything is fine. In the ODBC logs, the Smartsheet driver writes to UTF-8. But in php the sequence of bytes (in HEX format) is always transmitted: EFBFBD – Roman Gawrilov Apr 10 '18 at 09:55
  • [https://drive.google.com/file/d/1GnlBpzCKCyLe8dPxziaYg7L_liPUyKv-/view?usp=sharing](https://drive.google.com/file/d/1GnlBpzCKCyLe8dPxziaYg7L_liPUyKv-/view?usp=sharing) – Roman Gawrilov Apr 10 '18 at 09:59
  • That's just the Unicode replacement character ('?') as UTF-8. I'm not very familiar with PHP but I suspect that means PHP thinks it can't represent the text in the client character set. You may have to set the client character set to UTF-8 `Client_CSet=UTF-8`.in the ODBC connection string. This may help: https://www.easysoft.com/support/kb/kb01072.html – timwells Apr 12 '18 at 03:35

0 Answers0