1 2 Previous Next 21 Replies Latest reply: Apr 25, 2012 5:12 AM by 926113 Go to original post RSS
      • 15. Re: ODBC and UTF8 charset
        926113
        If I change the NS_LANG to russian_russia.cl8mswin1251 the situation is as follows:

        Select query returns data (which was inserted/updated from a php script) correctly in UTF8:
        Select dump returns: [name] => тест [DUMP("NAME",1016)] => Typ=1 Len=18 CharacterSet=AL32UTF8: d0,a1,e2,80,9a,d0,a0,c2,b5,d0,a1,d0,83,d0,a1,e2,80,9a

        But there is a problem with migrated data - select query returns this data in windows 1251 and their dump is as follows:
        [name] => ���� ��������� [DUMP("NAME",1016)] => Typ=1 Len=27 CharacterSet=AL32UTF8: d0,9f,d0,be,d1,81,d1,82,20,d0,be,d0,bf,d0,b5,d1,80,d0,b0,d1,82,d0,be,d1,80,d0,b0

        If I change the NS_LANG setting to russian_russia.al32utf8 than the selecting migrated data returns it correctly in UTF8!
        But the inserted/updated data from php script is returned in windows 1251:
        [name] => тест [DUMP("NAME",1016)] => Typ=1 Len=18 CharacterSet=AL32UTF8: d0,a1,e2,80,9a,d0,a0,c2,b5,d0,a1,d0,83,d0,a1,e2,80,9a
        • 16. Re: ODBC and UTF8 charset
          926113
          Can anyone help me with this matter?

          Edited by: 923110 on Apr 19, 2012 11:21 AM
          • 17. Re: ODBC and UTF8 charset
            orafad
            You need to verify the data stored. It seems to me, what you deem correct is in fact not correctly stored, and vice versa.

            E.g. the migrated data you have is: Пост оператора (but the ��... may indicate a representation/font issue on the client side)

            Use http://www.rishida.net/tools/conversion/ to study code units stored and their corresponding code units. Try to ignore the character display, as that may be deceiving and one part of the problem.
            • 18. Re: ODBC and UTF8 charset
              926113
              but the ��... may indicate a representation/font issue on the client side
              It was outputted in the Firefox browser as ��... in utf8 and after changing the charset to windows 1251 it was converted to "Пост оператора"
              You need to verify the data stored. Try to ignore the character display, as that may be deceiving and one part of the problem.
              It may take too much time. Perhaps there is a feature in Oracle SQL developer / Migration tool that can be used to migrate the data correctly?
              Or can you advice me another free tool for MySQL->Oracle migration?
              • 19. Re: ODBC and UTF8 charset
                926113
                I have just tried to use "Microsoft ODBC for Oracle" driver and the result is as follows:

                Select/Insert/Update migrated data - OK!
                Select/Insert/Update data from php script - OK!

                So there is a bug in Oracle ODBC driver concerning UTF8 charset encoding.

                But I have to use Oracle driver, so please reply to my previous post.
                • 20. Re: ODBC and UTF8 charset
                  orafad
                  923110 wrote:
                  So there is a bug in Oracle ODBC driver concerning UTF8 charset encoding.
                  The "bug" is actually in the ancient MS driver that is designed with Oracle7 in mind.
                  It does not support UTF-8/Unicode.
                  http://support.microsoft.com/kb/244661

                  You seem to be arriving at the wrong conclusions, based on what you see.

                  But per above, migrated character data is stored correctly, so you have a presentation/display issue in the client.

                  As issues related to character conversion and presentation is beyond ODBC scope, please try forum: {forum:id=50}
                  And if you do not find any useful from searching previous threads, try recap'ing and state the problem in a new thread in that forum.
                  • 21. Re: ODBC and UTF8 charset
                    926113
                    OK thanks!
                    1 2 Previous Next