Solved

Thai Characters from MSACCESS to HTML using PHP

Posted on 2008-06-25
5
321 Views
Last Modified: 2013-12-12
Hi experts,

I have an access database that I connect to using php for a client.

Everthing in english comes out perfect but the Thai characters come out as ?????? and other garbage characters.

If I copy and paste the characters in manually then the web page displays correctly
If I look at the database the characters also display correctly

When I call up the database with php to output the characters on the html/php page then I get the jargon.

Any ideas?

Thanks experts
I am using
 
<meta http-equiv="Content-Type" content="text/html; charset=tis-620">
<meta http-equiv="Content-Language" content="en,th">
 
and 
 
the database call is
 
$rS = $db_conn->execute("SELECT * FROM tblPOHeader WHERE PurchaseOrderNo = '$_GET[id]'"); 
while (!$rS->EOF) 
{
$supplier = $rS->Fields('CoLastName')->value; 
$ExpectedDate = $rS->Fields('ExpectedDate')->value; 
$orderdate = $rS->Fields('PODate')->value;
$rego = $rS->Fields('VehRego')->value;
$comments = $rS->Fields('JournalMemo')->value;
 
$rS->MoveNext();  }

Open in new window

0
Comment
Question by:nikdonovanau
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 36

Expert Comment

by:Loganathan Natarajan
ID: 21873780
check whether it is properly converted as encoding and stored... to check use this
<?php
 echo mb_detect_encoding($str);
?>

Open in new window

0
 
LVL 1

Author Comment

by:nikdonovanau
ID: 21895937
Hi logudotcom,

Thanks for that,
The output is in ASCII format

I had a quick look around on google but most functions are utf to ascii

How do it get it from ascii to output the thai chars correctly?

Thanks for your time
0
 
LVL 36

Accepted Solution

by:
Loganathan Natarajan earned 500 total points
ID: 21897173
You suppose to converted into UTF-8 (as to be used with multi byte functions in php) ... and display them

ref.
http://www.alex-hardy.co.uk/2008/02/11/utf-8-php-mysql/
http://www.phpwact.org/php/i18n/charsets
0
 
LVL 1

Author Closing Comment

by:nikdonovanau
ID: 31470834
Thank you for that. A+
0

Featured Post

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question