Saturday, February 25, 2012

OSQL + sql files with accent characters = problems!

Hi,
I've an SQL file which contain accent characters to fill my default values
like this:
insert into mtytable... values('Fvrier')
and also I create storedprocedures which execute some insert / update
command with the same values.
The SQL file is correct.
I've a batch file (.bat) which execute this command :
osql -E -i "MyScript.sql" -d MyDatabase
but the result is:
the accents disappeared !
Fvrier become Fvrier in the database!
My stored procedure has changed during the OSQL execution.
How can I solve the problem?
The storeprocedure (and other commands) are correct in the .sql file.
thanks.
Jerome.
"Jj" <willgart_A_@.hotmail_A_.com> wrote in message
news:uIuFDPyyEHA.2040@.tk2msftngp13.phx.gbl...
> Hi,
> I've an SQL file which contain accent characters to fill my default values
> like this:
> insert into mtytable... values('Fvrier')
> and also I create storedprocedures which execute some insert / update
> command with the same values.
> The SQL file is correct.
> I've a batch file (.bat) which execute this command :
> osql -E -i "MyScript.sql" -d MyDatabase
> but the result is:
> the accents disappeared !
> Fvrier become Fvrier in the database!
> My stored procedure has changed during the OSQL execution.
> How can I solve the problem?
> The storeprocedure (and other commands) are correct in the .sql file.
> thanks.
> Jerome.
>
osql can use Unicode input files, however, when you create the Unicode input
files,
you need to do so using UTF-16 rather than the default UTF-8.
HTH
Rick Sawtell
MCT, MCSD, MCDBA
|||ok, I'll try this
"Rick Sawtell" <quickening@.msn.com> wrote in message
news:uYdrCK0yEHA.2676@.TK2MSFTNGP12.phx.gbl...
> "Jj" <willgart_A_@.hotmail_A_.com> wrote in message
> news:uIuFDPyyEHA.2040@.tk2msftngp13.phx.gbl...
> osql can use Unicode input files, however, when you create the Unicode
> input files,
> you need to do so using UTF-16 rather than the default UTF-8.
> HTH
> Rick Sawtell
> MCT, MCSD, MCDBA
>
>

No comments:

Post a Comment