PHP COM encoding problems
PHP COM encoding problems
am 04.02.2009 13:23:26 von Carl-Fredrik Gustafsson
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.
When I read the file directly from the filesystem the characters are
fine, just as in the file. Also in the database the characters are as
they have to be.
Does anyone of you know that kind of problems with PHP and COM-Objects
and maybe a way to solve it?
Greetings
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: PHP COM encoding problems
am 04.02.2009 16:05:55 von Marco Schuster
2009/2/4 Carl-Fredrik Gustafsson :
> 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-Ob=
ject. Unfortunately I cannot connect directly to the database, I have to us=
e that COM-Object.
>
> My problem is now, that there seems to be some encoding-problem between t=
he 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
--=20
VMSoft GbR
Nabburger Str. 15
81737 München
Geschätsführer: Marco Schuster, Volker Hemmert
http://vmsoft-gbr.de
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: PHP COM encoding problems
am 05.02.2009 11:38:40 von Carl-Fredrik Gustafsson
Marco Schuster schrieb:
> 2009/2/4 Carl-Fredrik Gustafsson :
>> 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
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php