You are here: Re: cant insert cyrillic or greek charachters into mssql db « PHP Programming Language « IT news, forums, messages
Re: cant insert cyrillic or greek charachters into mssql db

Posted by eisenstein on 08/14/07 04:58

On 19 Jul., 06:30, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> eisenstein wrote:
> > On 17 Jul., 15:24, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> >> eisenstein wrote:
> >>> On 17 Jul., 09:42, Toby A Inkster <usenet200...@tobyinkster.co.uk>
> >>> wrote:
> >>>> eisenstein wrote:
> >>>>> i read out an utf-8 xml file with greek or russian/cyrillic
> >>>>> characters. i can display it in the browser but if i insert data into
> >>>>> anmssqldatabase -field is nvarchar(4000)- i only see ??? or
> >>>>> incorrect characters.
> >>>> This doesn't seem to be a PHP question. Try one of the microsoft.* groups.
> >>>> --
> >>>> Toby A Inkster BSc (Hons) ARCS
> >>>> [Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
> >>>> [OS: Linux 2.6.12-12mdksmp, up 26 days, 11:22.]
> >>>> demiblog 0.2.0 Released
> >>>> http://tobyinkster.co.uk/blog/2007/06/28/demiblog-0.2.0/
> >>> this is a php question: i use php with ms sql server and use php
> >>> functions to connect to the ms sql server
> >> That doesn't mean it's a php question.
>
> >> You use HTML also - it could be an HTML question. You usemssql- it
> >> could be anmssqlquestion. You use Apache or IIS - it could be an
> >> Apache or IIS question....
>
> >> I'll bet you even use a keyboard and mouse. Hey, it could be a keyboard
> >> or mouse question!
>
> >> The point is - just because you use PHP doesn't mean it's a PHP
> >> question. And in this case it isn't. There are a lot of other
> >> possibilities. You need to further determine exactly where the problem
> >> is.
>
> >> --
> >> ==================
> >> Remove the "x" from my email address
> >> Jerry Stuckle
> >> JDS Computer Training Corp.
> >> jstuck...@attglobal.net
> >> ==================
>
> > - Configuration IIS, PHP 5 and MS SQL SERVER 2000
> > - There's the possibility of uploading XML-Documents (UTF-8)
> > - A PHP-application reads some values, some of it hascyrillic
> > characters
> > - Showing the Characters in the Browser is no problem, but some of the
> > data should be insertet into an MS SQL Database (The datatype of the
> > fields are nvarchar):
> > This process does not work, whatever I use I just get wrong
> > characters. If I manually copy chars from the XML-File and paste it
> > into the database it displays it in the table.
>
> > If I test the same thing with MySQL (and SET NAME UTF-8) everything
> > works fine.
>
> > To connect to the MS-SQL Server I used MS-SQL Functions, tried ZEND DB
> > Adapter and also Pear AdoDB Connection. I always get the same results.
> > I tried to convert the strings from UTF-8 to UCS-2, but then all
> > Inserts are terminated.
>
> > $xmldata = ' ';
> > //$data = mb_convert_encoding($xmldata, "UCS-2", "UTF-8");
>
> > // Example using ADODB Connection
> > require_once 'adodb/adodb.inc.php';
> > $db =& ADONewConnection('odbc_mssql');
> > $dsn = "DRIVER={SQL Server};Server=localhost;Database=test";
> > $db->Connect($dsn, $username, $pwd);
> > $db->Execute("INSERT INTO test (test2) VALUES ('$data')");
>
> Sounds like you need to be looking for help in an MS SQL database newsgroup.
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> ==================



I solved the problem now: I just rewrote the whole app in C#. PHP is
not able to communicate with MSSQL and Unicode data.
Thnanks for your help

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация