dbTalk Databases Forums  

ODBC configuration "database file"

sybase.public.sqlanywhere.general sybase.public.sqlanywhere.general


Discuss ODBC configuration "database file" in the sybase.public.sqlanywhere.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ontsnapt
 
Posts: n/a

Default ODBC configuration "database file" - 08-25-2009 , 01:43 AM






SQL Anywhere 9

Is there a limitation on the characters used?

When i selected a databasefile from a folder with Russian characters
they are converted to ?????.

This is a problem for us. Is there a way to let the ODBC configurator
accept all characters?

Thanks
Eric

Reply With Quote
  #2  
Old   
Ontsnapt
 
Posts: n/a

Default Re: ODBC configuration "database file" - 08-26-2009 , 01:51 AM






Some more information:

If I enter C:\farm.win\форум\farm05.db it is changed in
c:\farm.win\?????\farm05.db.

So it seems as if the ODBC configurator is not unicode?

Thanks
Eric

Ontsnapt schreef:
Quote:
SQL Anywhere 9

Is there a limitation on the characters used?

When i selected a databasefile from a folder with Russian characters
they are converted to ?????.

This is a problem for us. Is there a way to let the ODBC configurator
accept all characters?

Thanks
Eric

Reply With Quote
  #3  
Old   
John Smirnios [Sybase]
 
Posts: n/a

Default Re: ODBC configuration "database file" - 08-26-2009 , 09:04 AM



What is the ANSI code page of the OS (what locale is the machine using)?
One easy way to determine that is to run "dbinit foo.db" and tell me
what collation it chooses for the database.

The ODBC module should correctly handle characters that are
representable in the OS's ANSI character set.

-john.
--
John Smirnios
Senior Software Developer
iAnywhere Solutions Engineering

Whitepapers, TechDocs, bug fixes are all available through the iAnywhere
Developer Community at http://www.ianywhere.com/developer

Ontsnapt wrote:
Quote:
Some more information:

If I enter C:\farm.win\форум\farm05.db it is changed in
c:\farm.win\?????\farm05.db.

So it seems as if the ODBC configurator is not unicode?

Thanks
Eric

Ontsnapt schreef:
SQL Anywhere 9

Is there a limitation on the characters used?

When i selected a databasefile from a folder with Russian characters
they are converted to ?????.

This is a problem for us. Is there a way to let the ODBC configurator
accept all characters?

Thanks
Eric

Reply With Quote
  #4  
Old   
Ontsnapt
 
Posts: n/a

Default Re: ODBC configuration "database file" - 08-27-2009 , 12:11 AM



Running dbinit returns:
Collation sequence: 1252LATIN1

Well., looking to directory from the command prompt I also see ????
instead of that russian name.

Are you trying to tell me that only names are supported that the dos
prompt can handle? This look likes if windows is build on top of the
command prompt. I have allways thought windows would support on every
level all characters.

Thanks
Eric

John Smirnios [Sybase] schreef:
Quote:
What is the ANSI code page of the OS (what locale is the machine using)?
One easy way to determine that is to run "dbinit foo.db" and tell me
what collation it chooses for the database.

The ODBC module should correctly handle characters that are
representable in the OS's ANSI character set.

-john.

Reply With Quote
  #5  
Old   
John Smirnios [Sybase]
 
Posts: n/a

Default Re: ODBC configuration "database file" - 08-27-2009 , 09:21 AM



There's more to it than that. Under the covers, NT and later versions of
Windows use Unicode UTF16 everywhere (well, UC2 on older NT class OS's).
If you use the Windows file explorer, you will note that all of the
characters show up correctly even if you have file names in Russian,
Chinese, Arabic... anything.

A Windows application can be either a Unicode application, an ANSI
application or a CONSOLE (OEM) application. Unicode GUI apps use UTF16,
ANSI GUI apps use the ANSI charset and console apps use the OEM charset.

On a 1252LATIN1 machine, the ANSI code page is 1252 and cannot represent
Russian characters:
http://demo.icu-project.org/icu-bin/...100-1997&s=ALL

On a 1252LATIN1 machine, the OEM/console code page is likely cp437 and
cannot represent Russian characters either:
http://demo.icu-project.org/icu-bin/...100-1995&s=ALL
You can run "chcp" at the command prompt to determine your OEM code page.

A Unicode GUI app should be able to handle any characters whatsoever;
however, an ANSI app can only handle characters that are representable
in the ANSI code page (cp1252 in your case). On systems where the
console code page is different from the ANSI code page, you need to be
extra careful -- some files that can be handled from GUI apps cannot be
handled from some console apps.

So, in short, the ODBC configuration dialog is an ANSI application and
can only handle characters in the ANSI charset. If you only need to
handle Russian letters, you can switch your computer to a Russian
locale. Alternatively, you could just use ASCII letters in your
filenames (or, in this specific case, use anything in cp1252).

-john.

--
John Smirnios
Senior Software Developer
iAnywhere Solutions Engineering

Whitepapers, TechDocs, bug fixes are all available through the iAnywhere
Developer Community at http://www.ianywhere.com/developer

Ontsnapt wrote:
Quote:
Running dbinit returns:
Collation sequence: 1252LATIN1

Well., looking to directory from the command prompt I also see ????
instead of that russian name.

Are you trying to tell me that only names are supported that the dos
prompt can handle? This look likes if windows is build on top of the
command prompt. I have allways thought windows would support on every
level all characters.

Thanks
Eric

John Smirnios [Sybase] schreef:
What is the ANSI code page of the OS (what locale is the machine
using)? One easy way to determine that is to run "dbinit foo.db" and
tell me what collation it chooses for the database.

The ODBC module should correctly handle characters that are
representable in the OS's ANSI character set.

-john.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.