0

Long story short. How can I fix users environments, to make them run our scripts using ANSI encode?

The problem is, we send them scripts to run on their databases using ANSI encode.

But some of them are returning to us with this problem:

enter image description here

We tried to say "please upgrade your software to run our scripts using ANSI encode" but most of them can't do this.

Is there a way for us, developers ( not me at all, I'm the DBA trying to help here ) to do something ?? WE have this problem since ever. we read all the internet and we couldnt fix this issue.

Thanks

  • Instead of trying to fix users' environments, you'll probably need to fix the way you save your scripts. This seems to be off-topic here though. – mustaccio Sep 19 '18 at 18:03
  • 4
    I'm voting to close this question as off-topic because it's about using Notepad++, so it's better suited for superuser.com – mustaccio Sep 19 '18 at 18:04
  • Yes I think this question will be downvoted or closed. But that's the problem. How can we fix this issue to be sure that ALL of our clients would be able to execute the script with no problems? If I'm not mistaken We tried to save then with "BOM"and it didn't work either. – Racer SQL Sep 19 '18 at 18:05
  • I'm going to ask this same question there. Yes maybe is better suited for them. Thanks bro. – Racer SQL Sep 19 '18 at 18:05
  • Can you please post a sample SELECT statement that the script runs and returns non--ANSII characters? – Michael Kutz Sep 19 '18 at 21:24
1

First question would be: "What does ANSI encoding mean?"

Answer depends on your Windows, see this list: National Language Support (NLS) API Reference (column "ANSI codepage")

Let's assume you have a "western" Windows, then ANSI encoding most likely means Codepage 1252

In this case you must set your NLS_LANG environment value accordingly to NLS_LANG=.WE8MSWIN1252

See also https://stackoverflow.com/questions/33783902/odbcconnection-returning-chinese-characters-as/33790600#33790600

As far as I remember SQL scripts must not have any BOM (Byte Order Mark) at the beginning.

Not the answer you're looking for? Browse other questions tagged or ask your own question.