freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
[freetds] Re: Problem of unicode ( Inserted data / Query )
- From: Daniel Fazekas <fdsubs AT axelero.hu>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: [freetds] Re: Problem of unicode ( Inserted data / Query )
- Date: Mon, 29 Mar 2004 18:57:15 +0200
On Mar 29, 2004, at 18:17, edwardspl AT ita.org.mo wrote:
Dear You,
How to control php convert inserted data or query to / from MS-SQL ( MUST in
charset of unicode ) ?
Please, Edward, for Christ's sake, just tell us already what your *problem* is and what are you trying to do.
There are dozens of places and ways to do a character encoding translation.
If it is a web application, which we can't know for sure as you are really secretive about what you are trying to accomplish, then you could simply serve the html page with the character encoding you desire.
You can do that by adding a
<meta http-equiv="content-type" content="text/html; charset=utf-8">
inside the <head> ... </head> part of your page. Or, you could do the same with PHP, *before outputting any data*, by modifying the http response headers like this:
<?php
header('Content-type: text/html; charset=utf-8');
?>
If you did this, the character encoding conversion's task is up to the client's browser. You receive the client's reply in the same character encoding you used for your page.
If, for some reason you still have to convert it afterwards, you can use the iconv extension in php:
http://www.php.net/iconv
And finally, you can get FreeTDS to do the conversion for you, by setting the character encoding in the freetds.conf file, as James described to you several times over, on every second day the past couple of months.
A client user ( using his/her own language ) insert some data into MS-SQL,
then MS-SQL MUST store the data ( which come from the client user ) in unicode
format ( charset ).
Where and how is that client inserting the data into the database?
A web application?
What's your problem? What isn't working the way you'd like it to?
A client user ( using his/her own language ) search some info from MS-SQL, but
all of the format of stored data were unicode ( charset ), so must convert the
charset of unicode to a special format ( charset ) for the client user (
correspond to his/her own language )
No, you don't have to convert anything usually. Any web browser on any operating system released in the past couple days can display unicode web pages just fine.
--
fds
-
Re: [freetds] Problem of unicode ( non-english character )
, (continued)
-
Re: [freetds] Problem of unicode ( non-english character ),
edwardspl, 03/26/2004
- Re: [freetds] Problem of unicode ( non-english character ), Daniel Fazekas, 03/26/2004
- [freetds] Segmentation fault with Apache 2.0.49 and PHP 5.0.0b4 - FreeTDS 0.60, Carlo Simeone, 03/26/2004
-
RE: [freetds] Problem of unicode ( non-english character ),
Lowden, James K, 03/26/2004
-
Re: [freetds] Problem of unicode ( non-english character ),
edwardspl, 03/27/2004
- Re: [freetds] Problem of unicode ( non-english character ), Frediano Ziglio, 03/27/2004
-
Re: [freetds] Problem of unicode ( non-english character ),
James K. Lowden, 03/27/2004
-
Re: [freetds] Problem of unicode ( non-english character ),
edwardspl, 03/27/2004
-
Re: [freetds] Problem of unicode ( non-english character ),
James K. Lowden, 03/27/2004
-
[freetds] Problem of unicode ( Inserted data / Query ),
edwardspl, 03/29/2004
- [freetds] Re: Problem of unicode ( Inserted data / Query ), Daniel Fazekas, 03/29/2004
-
[freetds] Problem of unicode ( Inserted data / Query ),
edwardspl, 03/29/2004
-
Re: [freetds] Problem of unicode ( non-english character ),
James K. Lowden, 03/27/2004
-
Re: [freetds] Problem of unicode ( non-english character ),
edwardspl, 03/27/2004
-
Re: [freetds] Problem of unicode ( non-english character ),
edwardspl, 03/27/2004
-
Re: [freetds] Problem of unicode ( non-english character ),
edwardspl, 03/26/2004
Archive powered by MHonArc 2.6.24.