[PHP-DB] Re: ODBC Problem

2005-10-14 Thread Serafin Agoiz
Good morning Rodrigo (morning at least here :-) )

Take a look at this link:
http://www.shawnolson.net/a/946/

I had the same problem and now it's solved.

The problem is that MySQL and maybe another DDBB, they doesn't expect the
data to be in utf8.

I have added this line:

$variable = mysql_query(SET NAMES  'utf8');

before to insert the datas and before to select,
and now everything is working.

Let me now if yor try it and works.

Thanks.
Serafin


Rodrigo Haces wrote:

 Hi all:
 
 Im  currently using php to connect to a database in another server, this
 is a intersystems cache database.
 
 if i do a query to my database and the result has special spanish
 characters like ´ (á,é,í,ó,ú) it returns me another character, this one
 changes from time to time, i just tried to make a test with the isql shell
 program, i connect and ask for the same query and in shell it returns the
 correct characters.
 
 If someone can help me please i'll apretiate.
 
 Thanks
 rodrigo

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] ODBC Problem

2005-10-11 Thread Serafin Agoiz
Good morning, 
I have almost the same problem, but just with cirilic characters.

I have this state on every page, html and php:
meta http-equiv=Content-Type content=text/html; charset=utf-8

if I try to show cirilic characters I don't have problems.
If I try to insert names in cirilic then I have problems with some
characters only. If I insert the names in latin characters I don't have
anykind of problems.
I have tried with phpMyAdmin interface. I can insert cirilic characters
without problems, but if later I take this datas to my web site I obtain
just . And if I read the cirilic characters I have introduced by
the website there is no sense.

I have tried changing the charset on both, database and website, without
results. I have changed from POST to GET without fine result.

Maybe an Apache problem? I am testing it right now.

Lost, just lost.

Kind regards,
Serafin


Matthias Willerich wrote:

 this sounds a little bit like a wrong charset. I don't know which one your
 database or your php is running on, but, for a start, play with this:
 - charset of the file: If you open your file in an editor that allows
 storing it as different kinds of charsets, try saving it as something
 else. It's probably ANSI, try UTF-8 or Unicode.
 - charset of delivery: If your request ends in one or the other form of
 html, remember to put in a content type, like this:
 meta http-equiv=Content-Type content=text/html; charset=?php echo
 $charset; ?
 again, play around with the variable $charset, or, instead, hardcode it in
 the way you need it. I'm not sure about this, but maybe you can change the
 same thing by changing the character encoding in your browser manually and
 not putting in any content-type. Once you've found what you need, put it
 in as meta tag.
 
 Cheers,
 Matthias
 
 
 -Original Message-
 From: Rodrigo Haces [mailto:[EMAIL PROTECTED]
 Sent: 10 October 2005 23:13
 To: php-db@lists.php.net
 Subject: [PHP-DB] ODBC Problem
 
 
 Hi all:
 
 Im  currently using php to connect to a database in another server, this
 is a
 intersystems cache database.
 
 if i do a query to my database and the result has special spanish
 characters like ´ (á,é,í,ó,ú) it returns me another character, this one
 changes from time to time, i just tried to make a test with the isql shell
 program, i connect and ask for the same query and in shell it returns the
 correct characters.
 
 If someone can help me please i'll apretiate.
 
 Thanks
 rodrigo
 
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php