cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
dak565656
Level 4

SQL Scripts and encoding

Sql Scripts work just fine until I want to insert/update non-english text:
INSERT INTO Table VALUES(..., 'Non-english text', ...).
What encoding does installshield use to perform such queries?
Labels (1)
0 Kudos
(7) Replies
hidenori
Level 17

Try adding a preceding N to the record data in the INSERT statement as follows, and see if it solves your issue:

INSERT INTO Table VALUES(..., N'Non-english text', ...)

If you are using an ANSI script file, InstallShield will use the current Windows system code page on the target system. You may need to use a Unicode script file in order to solve your issue.
0 Kudos
dak565656
Level 4

hidenori wrote:
Try adding a preceding N to the record data in the INSERT statement as follows, and see if it solves your issue:
INSERT INTO Table VALUES(..., N'Non-english text', ...)

Didn't help...

hidenori wrote:
You may need to use a Unicode script file in order to solve your issue.

If I have script in UTF-8, installshield shows bad symbols in editor and doesn't even exucute such query
0 Kudos
hidenori
Level 17

The SQL feature currently does not support the UTF-8 file format. Please convert it to the Unicode file format manually using a text editor such as Notepad.exe.
0 Kudos
dak565656
Level 4

Unfortunately I didn't get it to work (((
What I tried:
1) Script file in ANSI created in IS IDE. Inserts bad symbols to oracle database.
2) Script file created in UTF8 and imported (or inserted) to IS (BTW, IS refuses to show script in unicode). Inserts bad symbols...
3) Script file created in UTF16 and imported (or inserted) to IS. Inserts bad symbols...

Please help!
0 Kudos
hidenori
Level 17

If you run those same script files from an Oracle's client tool such as SQL*Plus, is the record updated as you expect?
0 Kudos
dak565656
Level 4

SQLPlus can't execute neither utf8 or unicode script file. Can't recognize initial symbols before insert statement: "unknown command beginning "п»їinsert ..." - rest of line ignored"

It works only if script file is in native codepage (Win-xxxx). And it's fine - no bad symbols
0 Kudos
dak565656
Level 4

I also noticed that if I copy and paste text with non-english symbols to notepad from Installshield script window, text becomes invalid. Just like I can't write non-english symbols to any string field in IS (product name for example), because they become invalid. So I have to use string table...
0 Kudos