cant insert cyrillic or greek charachters into mssql db

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • eisenstein

    cant insert cyrillic or greek charachters into mssql db

    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
    an mssql database -field is nvarchar(4000)- i only see ??? or
    incorrect characters.

    has anyone expierence with unicode characters and mssql databses?

  • Toby A Inkster

    #2
    Re: cant insert cyrillic or greek charachters into mssql db

    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
    an mssql database -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

    Comment

    • eisenstein

      #3
      Re: cant insert cyrillic or greek charachters into mssql db

      On 17 Jul., 09:42, Toby A Inkster <usenet200...@t obyinkster.co.u k>
      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
      an mssql database -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/0...emiblog-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

      Comment

      • Jerry Stuckle

        #4
        Re: cant insert cyrillic or greek charachters into mssql db

        eisenstein wrote:
        On 17 Jul., 09:42, Toby A Inkster <usenet200...@t obyinkster.co.u k>
        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
        >>an mssql database -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/0...emiblog-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 use mssql - it
        could be an mssql question. 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.
        jstucklex@attgl obal.net
        =============== ===

        Comment

        • Darko

          #5
          Re: cant insert cyrillic or greek charachters into mssql db

          On Jul 17, 3:24 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
          eisenstein wrote:
          On 17 Jul., 09:42, Toby A Inkster <usenet200...@t obyinkster.co.u k>
          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
          >an mssql database -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.]
          >>
          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 use mssql - it
          could be an mssql question. 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...@attgl obal.net
          =============== ===
          I agree. Especially that most probably the problem lies in your
          default db character set (encoding) setting. Most probably MS uses
          latin or something like that, so you'll have to configure it being
          unicode (utf8 or whatever you use in your file). However, if you used
          postgres for example, you could be armed with pg_set_client_e ncoding
          and pg_client_encod ing functions which would probably be able to help
          you solve the problem. Mssql, ... well, seems to me PHP is not
          equipped to do the same with that. That's why I never use it - except
          when working .net or similar.

          Comment

          • Jerry Stuckle

            #6
            Re: cant insert cyrillic or greek charachters into mssql db

            Darko wrote:
            On Jul 17, 3:24 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
            >eisenstein wrote:
            >>On 17 Jul., 09:42, Toby A Inkster <usenet200...@t obyinkster.co.u k>
            >>wrote:
            >>>eisenstein wrote:
            >>>>i read out an utf-8 xml file with greek or russian/cyrillic
            >>>>character s. i can display it in the browser but if i insert data into
            >>>>an mssql database -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/0...emiblog-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 use mssql - it
            >could be an mssql question. 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
            >possibilitie s. You need to further determine exactly where the problem
            >is.
            >>
            >--
            >============== ====
            >Remove the "x" from my email address
            >Jerry Stuckle
            >JDS Computer Training Corp.
            >jstuck...@attg lobal.net
            >============== ====
            >
            I agree. Especially that most probably the problem lies in your
            default db character set (encoding) setting. Most probably MS uses
            latin or something like that, so you'll have to configure it being
            unicode (utf8 or whatever you use in your file). However, if you used
            postgres for example, you could be armed with pg_set_client_e ncoding
            and pg_client_encod ing functions which would probably be able to help
            you solve the problem. Mssql, ... well, seems to me PHP is not
            equipped to do the same with that. That's why I never use it - except
            when working .net or similar.
            >
            Actually, MySQL handles it just fine. But you have to set the
            appropriate charset. Also, you have to have the correct charset in your
            HTML, for instance.

            Lots of possibilities - none of them PHP.


            --
            =============== ===
            Remove the "x" from my email address
            Jerry Stuckle
            JDS Computer Training Corp.
            jstucklex@attgl obal.net
            =============== ===

            Comment

            Working...