Please be aware that the SAP SQL Anywhere Forum will be shut down on August 29th, 2024 when all it's content will be migrated to the SAP Community.


My SQL Server database has some tables with NVarchar fields to allow multiple languages in the same database.

But i've found in your documentation the following limitation:

Is there a possibility of this feature is available soon?

asked 13 Sep '12, 18:18

David%20Garcia's gravatar image

David Garcia
accept rate: 0%

edited 14 Sep '12, 07:56

Volker%20Barth's gravatar image

Volker Barth

That's not my topic at all, but Ultralite does at least support a UTF-8 collation, in case that may fulfill your requirements...

(14 Sep '12, 07:55) Volker Barth

Yes, ultralite supports UTF-8 but the max-length of varchar fields defines the byte length and the SQL Server the NVarchar fields defines the string length, and with that scenario you should multiple yours ultralite varchar fields in 4x for be able to accept japanese characters for example, but this causes a problem with ASCII characters that will be able to insert more chars that the server can handle.

Then you should always validate all ultralite varchar fields in your app to doesn't causes problem with SQL Server NVarchar size.

Do you have any other suggestion? Tks for while.

(14 Sep '12, 09:08) David Garcia
Replies hidden

Yes, the application would have to validate the input to ensure ascii characters do not exceed the consolidated db's limit. Your sync scripts could just truncate uploaded values.

(14 Sep '12, 09:18) PhilippeBert...

Support for NVARCHAR (or character length semantics) in UltraLite is not in the near future. It's uncertain for the long term.

(14 Sep '12, 11:04) Paul

If you want to support all unicode characters, you need to create an UltraLite database that uses utf8 data encoding (collation sequence is independant of the encoding).

For example: ulload - c --utf8_encoding=1 ulinit --utf8_encoding=on


conn = ULDatabaseManager::CreateDatabase( "DBF=mydb.udb", "utf8_encoding=on" );

The default as of 12.0.0 is to create a database with utf8 encoding.

When defining the remote (UltraLite) tables, make sure that you allocate 3 times the number of bytes that the nvarchar(c) column is defined as to ensure data is not truncated. That is if the consolidated db has NVARCHAR(10), the UltraLite db should have CHAR(30) as the corresponding column.

As for future support of any feature, we cannot comment. However we will note your request for this feature. Thanks for using UltraLite and for providing feedback.

permanent link

answered 14 Sep '12, 09:04

PhilippeBertrand%20_SAP_'s gravatar image

accept rate: 22%

edited 14 Sep '12, 09:22

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 13 Sep '12, 18:18

question was seen: 2,849 times

last updated: 14 Sep '12, 11:04