Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 642
  • Last Modified:

ISO8859_1 character set will not let me insert records containing Norwegian characters

I get the "cannot transliterate..." message

Seems like i cannot understand the relationship between database character sets and column character sets.

Any knowledge out there?

regards
classmate
0
classmate
Asked:
classmate
  • 6
  • 4
  • 3
  • +1
1 Solution
 
BAlexandrovCommented:
All of the knowledge is in the fine documentation.
If you have a problem check to find a sollution there:
www.ibphoenix.com

If not luck -  ask here making full explanation what you do and what is wrong.

Bojidar Alexandrov
0
 
classmateAuthor Commented:
I had no luck unfortunately...

The initial problem is that sql queries will not "find" norwegian characters in the database when character set is NONE, though theese characters have been inserted.

Thus i try to create test databases seemingly compatible with desired characters, like ISO8859_1 and DOS865. Theese are default character sets in my test databases.

I also specify character set at column level, and I try with or without collation (ISO8859_1 : NO_NO and DOS865 : PDOX_NORDAN4, since i am converting an application from Paradox to Interbase).

When i do the following in ISQL :

create table test (
ID integer not null,
text varchar(30) character set ISO8859_1 collate NO_NO,
primary key (ID)
);

insert into test
values (1, 'ÆØÅæøå')
;

or by any means use a character set,
I get the message:

Arithmetic exception, numeric overflow, or string truncation
Cannot transliterate character between character sets
Statement: insert into test
values (1, 'ÆØÅæøå')

When i don't use character sets, this insert works OK, but select-statements containing non-english characters won't give a result in all cases and Upper() will not work properly.
0
 
classmateAuthor Commented:
FXEfxe  should have been something like
ØÅøå
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
classmateAuthor Commented:
Strange - i cannot make my special chars work in html either.... :-(
0
 
BAlexandrovCommented:
About last comment - it is by design - they are encoded for security reasons
0
 
BAlexandrovCommented:
About character sets. The one side is defining default characterset on database then when you create fields without saying what characterset to be - they will use the default.
Another approach is to supply to each char/varcahr field the characterset and collation.

And at last - you must specify what characterset you want to use when connect to that database - so you must supply this param to your conection. I have no idea what method of access you use but it will be parameter of database or connection component.
Something like: lc_ctype=ISO8859_1
must be added.

Bojidar Alexandrov
0
 
classmateAuthor Commented:
>>And at last - you must specify what characterset you want to use when connect to that database - so you must supply this param to your conection.

I use the IBConsole to connect in theese tests... Do you know how to set up this param here??

0
 
BAlexandrovCommented:
Hmm, I don't have IBConsole to check out... last few months I have moved to Firebird and for management tool - www.IBExpert.com

See at database connection settings - where you have registered your database.

Bojidar Alexandrov
0
 
catalinmCommented:
use

create table test (
ID integer not null,
text varchar(30) character set NONE,
primary key (ID)
);

will be accept any character.
0
 
classmateAuthor Commented:
Hi catalinm

This is true but with this approach i have some trouble making my select queries work as they should using special (national) characters. This applies both to ordering issues and the ability to recognize a character in the WHERE clause.


classmate
0
 
kacorretiredCommented:
Hi classmate,

if you got the needed answer, please accept it by clicking on Accept in the header of the good answer. By this way you can express thanks for expert's support

with best regards

Janos
0
 
kacorretiredCommented:

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:
       to accept BAlexandrov's answer
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

kacor
EE Cleanup Volunteer
0
 
classmateAuthor Commented:
I found the solution by myself a while ago...

It's like this:
IBConsole does not let you change the character set for a connection once it is set up. Thus you need to be aware of this parameter when you set up the connection - which is not very obvious.

(This is not the same as giving the database a default character set when you create it)


classmate.
0
 
kacorretiredCommented:
Hi classmate,

thanks for your comment. If nobody places his new comment the new recommendation for this question is:
     
     PAQ and refund points

kacor
EE Cleanup Volunteer
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 6
  • 4
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now