Problem with local language in label or other value.


« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by Mistoss on 21st May 2013
I try to define the chart labels in other language such as

bar.Set('chart.labels', ['ม.ค.', 'ก.พ.']);

'ม.ค.' and 'ก.พ.' are Thai Language.
But the output seem to be not encoding (look like not UTF-8).

My html file is already set to "UTF-8" charset.
Please advise any solution. Thank you.
Posted by RGraph support on 21st May 2013
Hi there,

By the looks of it you're using HTML entities - canvas is not HTML. So try using the actual characters instead. You may also need to change the pages character set.



Richard, RGraph Support

5 developer license with Priority support for £299:
    www.rgraph.net/license#five-developer
Posted by Mistoss on 21st May 2013
Hi, Richard

Thank you for your response.

I already use the actual characters but the forum converts to char's code. I try to use other language but only English language that can fill on labels or title.
Posted by RGraph support on 21st May 2013
Hi there,

In that case you may need to stipulate the correct character set as part of your Content-Type header. You can do this with the PHP function: header() For example:

header('Content-Type: text/html;charset=UTF-8');

You may need to use a different character set depending on your country. You might also be able to set this with a META tag:

<meta charset="utf-8">

or:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">



Richard, RGraph Support

5 developer license with Priority support for £299:
   www.rgraph.net/license#five-developer

Add a reply

 




« Back to message list
RGraph on social media