Issue with Non-English contents

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

Gopalan.Lakshmipathi
Ebase User
Posts: 9
Joined: Mon Aug 18, 2014 12:30 pm
Location: Ireland

Issue with Non-English contents

#1

Postby Gopalan.Lakshmipathi » Tue Aug 19, 2014 7:31 am

Dear All,

We are trying to store some non-English contents through the Ebase forms into SQL server 2008 database and those contents are getting saved with question mark symbols (???????). This is not occuring for all the languages and its only for some of the languages as mentioned below.

Please validate and let me know if you have any inputs on this issue.

Database Details:

DB Type : SQL Server 2008 Version:10.0.2531.0

DB column data type : nvarchar(max)

Some of the non-supported languages:

Japanese, Greek, Bulgarian, Russian, Chinese, Korean and Thai.


Thanks,
Gopalan.
0 x

Hovik
Moderator
Moderator
Posts: 184
Joined: Tue Sep 11, 2007 8:58 am

#2

Postby Hovik » Tue Aug 19, 2014 1:49 pm

Hello Gopalan,

nvarcahr is the correct column type in Sql Server, allowing for Unicode characters.

One suggestion I have is to change the Character Encoding for all of Ebase. This is done in the Internationalization dialogue under the Character Encoding tab. Select the "Always use encoding" option and set it to UTF-8.

Could you try this and let me know how you get on please?

Thanks,
Hovik
0 x

Gopalan.Lakshmipathi
Ebase User
Posts: 9
Joined: Mon Aug 18, 2014 12:30 pm
Location: Ireland

#3

Postby Gopalan.Lakshmipathi » Tue Aug 19, 2014 2:17 pm

Hi Hovik,

I tried setting the "Always use encoding" option but still I couldn't overcome this issue. Is there any way to review the update scripts before passing on to the database? Please let me know.

Thanks,
Gopalan.
0 x

Hovik
Moderator
Moderator
Posts: 184
Joined: Tue Sep 11, 2007 8:58 am

#4

Postby Hovik » Tue Aug 19, 2014 3:24 pm

Hi Gopalan,

There is Debug checkbox at the top right of database resources. Check this and save the resource, then you will see the actual insert/update/select statement issued against the database in the server log and also in the execution log if you run the from from the designer.

Hovik
0 x

Gopalan.Lakshmipathi
Ebase User
Posts: 9
Joined: Mon Aug 18, 2014 12:30 pm
Location: Ireland

#5

Postby Gopalan.Lakshmipathi » Wed Aug 20, 2014 8:55 am

Hi Hovik,

Thanks for the update.

As per the information from the logs, SQL server is expecting the generated script in the following way ('N' prefix required for Unicode characters). Please let me know, if there is any option to overcome this issue.

Ebase generated script against SQL:

update entity_name
set entity_name = '星期一,星期二,星期三'
where entity_id = 44992

Solution identified:

update entity_name
set entity_name = N'星期一,星期二,星期三'
where entity_id = 44992

Thanks,
Gopalan.
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#6

Postby Jon » Wed Aug 20, 2014 1:44 pm

Gopalan,

It looks from your last post that your Database Resource has the Use Prepared Statements option unchecked. Could you try turning this option on. If you are using the JTDS JDBC driver (this is the default for an MSSQL connection with Ebase), all character data should be passed to the DBMS as unicode by default. You shouldn't need to do anything else.

If this doesn't work, I think you might try using the Microsoft JDBC driver instead of the distributed JTDS driver.

Regards
Jon
0 x

Gopalan.Lakshmipathi
Ebase User
Posts: 9
Joined: Mon Aug 18, 2014 12:30 pm
Location: Ireland

#7

Postby Gopalan.Lakshmipathi » Wed Aug 20, 2014 3:13 pm

Hi Jon,

Please let me know where I can find 'Use Prepared Statements' option in the database resource.

Thanks,
Gopalan.
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#8

Postby Jon » Thu Aug 21, 2014 6:43 am

It's a checkbox in the options section towards the top of the Database Resource Editor panel.
0 x

Gopalan.Lakshmipathi
Ebase User
Posts: 9
Joined: Mon Aug 18, 2014 12:30 pm
Location: Ireland

#9

Postby Gopalan.Lakshmipathi » Thu Aug 21, 2014 7:06 am

Hi Jon,

Is that option available in Ebase version 3.4.0?

Thanks,
Gopalan.
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#10

Postby Jon » Thu Aug 21, 2014 7:51 am

No it's not available in V3.4.0. The current version is V4.5.2 and lots of new features have been introduced, you might consider an upgrade.

But back to your problem...
You could get the system to use the N'' syntax by changing the database resource to use advanced sql - this is where you configure all the SQL statements explicitly. Then the update statement will look something like this:

update entity_name
set entity_name = N'&&{entity_name}'
where entity_id = &&entity_id

There is a Build button that will do most of this for you. You may also need to configure the select, insert and delete statements.

Regards
Jon
0 x

Gopalan.Lakshmipathi
Ebase User
Posts: 9
Joined: Mon Aug 18, 2014 12:30 pm
Location: Ireland

#11

Postby Gopalan.Lakshmipathi » Fri Aug 29, 2014 2:46 pm

Hi Jon,

We tried to fix this issue with your suggestion above but we are getting the following syntax error and the contents are coming with question mark symbols in the server log.

Error : SQL error updating database source WEB_FORM update web_form set alternate_language_name = N'{'???,???,??? ???,?'}' where entity_id = 44992 - Incorrect syntax near '???'.

As per your initial suggestion, Can we try using the Microsoft JDBC driver instead of the distributed JTDS driver?

If so, could you please let us know the steps to update JTDS driver to Microsoft JDBC driver?

Thanks,
Gopalan.
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#12

Postby Jon » Fri Aug 29, 2014 3:08 pm

Gopalan,

There was a mistake in my last reply - which I edited later. The syntax should be:

set entity_name = N'&&{entity_name}'
not..
set entity_name = N'{&&entity_name}'

The { was in the wrong place. Can you try it like this first. The &&{entity_name} should be replaced with your data and you should see this in the debug log.

Regards
Jon
0 x

Gopalan.Lakshmipathi
Ebase User
Posts: 9
Joined: Mon Aug 18, 2014 12:30 pm
Location: Ireland

#13

Postby Gopalan.Lakshmipathi » Mon Sep 01, 2014 10:24 am

Thanks Jon. Your response has resolved the issue.

Regards,
Gopalan.
0 x


Who is online

Users browsing this forum: No registered users and 7 guests