php-windows Digest 5 Feb 2009 10:38:45 -0000 Issue 3563
Topics (messages 29142 through 29144):
PHP COM encoding problem
29142 by: Carl-Fredrik Gustafsson
Re: PHP COM encoding problems
29143 by: Marco Schuster
29144 by: Carl-Fredrik Gustafsson
Administrivia:
To subscribe to the digest, e-mail:
php-windows-digest-subscr...@lists.php.net
To unsubscribe from the digest, e-mail:
php-windows-digest-unsubscr...@lists.php.net
To post to the list, e-mail:
php-wind...@lists.php.net
----------------------------------------------------------------------
--- Begin Message ---
Hi everyone,
I have quite a problem with a COM-Object in PHP.
Following Situation:
I have a COM-Object that connects to a UNICODE-encoded database, reads
certain texts and returns them to PHP, where I process the text and send
it back to the database via the COM-Object.
Unfortunately I have to use the COM-Object and can not connect directly
to the database.
My problem is now, that there seems to be an encoding-problem between
the COM-Object and PHP. For example I have a letter that looks like an
"i", only without the dot above it. When I read a text containing this
letter from the COM-Object, I get that letter returned as a normal "i".
I have tried different internal encodings in PHP, but with no effect.
When I read the original file with these letters from the filesystem,
PHP handles it perfectly, also in the database the letters are correct.
It can't be a problem between the COM-Object and the database, because
when I do the same thing using C# it comes out as it's expected, but
somehow I have to get it working in PHP.
Does anyone of you know that kind of problem and maybe a solution to it?
Greetings
Calle
--- End Message ---
--- Begin Message ---
2009/2/4 Carl-Fredrik Gustafsson <cgustafs...@transline.de>:
> Hi everyone,
>
> I have quite a problem using a COM-Object in PHP.
>
> The COM-Object connects to a database that's UTF-16 encoded and gets
> text-contents, that I want to process in PHP and write it back using the
> COM-Object. Unfortunately I cannot connect directly to the database, I have
> to use that COM-Object.
>
> My problem is now, that there seems to be some encoding-problem between the
> COM-Object and PHP. For example I have a character that looks like an "i" but
> without the dot. When I read it via the COM-Object, it returns it as a normal
> "i". I also tried different internal encodings in PHP, but with no effect.
You could use the multibyte string functions (mb_XX) for characterset stuff.
Good luck!
Marco
--
VMSoft GbR
Nabburger Str. 15
81737 München
Geschätsführer: Marco Schuster, Volker Hemmert
http://vmsoft-gbr.de
--- End Message ---
--- Begin Message ---
Marco Schuster schrieb:
2009/2/4 Carl-Fredrik Gustafsson <cgustafs...@transline.de>:
Hi everyone,
I have quite a problem using a COM-Object in PHP.
The COM-Object connects to a database that's UTF-16 encoded and gets
text-contents, that I want to process in PHP and write it back using the
COM-Object. Unfortunately I cannot connect directly to the database, I have to
use that COM-Object.
My problem is now, that there seems to be some encoding-problem between the COM-Object and PHP. For
example I have a character that looks like an "i" but without the dot. When I read it via
the COM-Object, it returns it as a normal "i". I also tried different internal encodings
in PHP, but with no effect.
You could use the multibyte string functions (mb_XX) for characterset stuff.
Good luck!
Marco
Hi Marco,
thanks for your reply, unfortunately I already tried that without any
positive effect.
Best regards
Calle
--- End Message ---