Grid Connector Encoding Error

Hey all,
I have a very strange problem for you.

Problem: a connector (for a grid) is not pulling data from a table correctly.
Prior Context: this is a music managing application (hence the use of artist,album,etc. in the code)

When browsing directly to the connector (localhost/connector.php) in Google Chrome (the only one that shows the encoding error), I get the error message:

“This page contains the following errors:
error on line 1 at column 317285: Encoding error
Below is a rendering of the page up to the first error.”

The code in question is:

[code]<?php
session_start();
require_once(“…/…/dhtmlx/dhtmlxConnector/codebase/grid_connector.php”);
$res = mysql_connect(“localhost”,“root”,“password”);
mysql_select_db(“cwu”, $res);

$grid = new GridConnector($res,"MySQL");

// does work, no encoding error
// // $grid->render_sql("SELECT * from music_library where location <> 'Automation'", "id", "artist,album,song,location,composer, pending");

// does not work, gives encoding error
// // $grid->render_table("music_library");
// as well as:
$grid->render_sql("SELECT * from music_library", "", "artist,album,song,location,composer,pending");

?>[/code]

So for some reason, doing a basic “select * from X” seems to give me an encoding error.

Is there something wrong with my code? Or is this an issue with my database? I can provide database schemas/dumps if needed.

Thank you in advance.

Wow. I was just using the wrong encoding in the database; somehow it was set to Latin instead of utf-8.

Feel free to remove.