Monday, May 13, 2013

Setting NLS_LANG on Windows for Oracle Database

Sometimes, it is difficult to deal with Windows Platform as it drains the hell out of us!! Recently, I have come across a situation where one of my client's requirement was to input Arabic language into Oracle Database [or] read/retrieve the output into Various client Applications such as PL/SQL Developer/SQL Developer/TOAD etc.. Inputting the non-english language into Database  has never been difficult as we are given plenty of language options within our beloved Oracle Database, but, the problem lies within the complex Windows OS when user wanted to view the data in his/her beloved language, in Applications such as PL/SQL Developer or SQL Developer etc.. This post is all about it.

Character Set, Character encoding, & Code point

Yes, it is a group of characters that is recognised by the Hardware through the OS Interface. Every character is allocated a number, called a code point, these code points will be represented in the computer by one or more bytes. So, every character has to be unlocked or cracked by reading this code in order to either understandable by machine or readable by the User, which is called Character encoding

How Windows OS deals with this Character Set?

In Windows, Character Sets are called Code Pages (CP). A Code page is set of characters that used to be the conventional approach of Character encoding within Windows OS, was replaced by "Unicode" later point in time otherwise still very much compatible to use. There are basically 3 types of Code Pages we see within Windows Registry,
  • ACP
ACP is ANSI Code Page used for native non-unicode Application using a Graphical User Interface on Windows Systems.
  • OEMCP
OEMCP is used by Win32 Applications which is originated from IBM PC Architecture

  • MACCP
Indicates the default code page for characters in non-Unicode Macintosh programs. 

How to do it?

Step (1) : Change the ANSI Code Page (ACP) (Change the Locale)
Changing the Code Page could be same as changing the locale of the system for almost all times. It can be done within the registry or Control Panel settings, but Control Panel method is strongly recommended. Changing it within the registry may cause system to malfunction or even get crashed on the boot that obviously requires a Backup to restore, and Recovery which is quite dangerous and time consuming.  
This post's objective is to enable the non-english(Arabic in this case) code page for third party GUI applications, so reflecting the ACP to desired code page number will do the job for us.  Following is the procedure I have followed successfully, the desired ANSI code page for Arabic language is 1256. You may check what is desired for your environment here
  • Start->Control Panel
  • Double click the Regional Language and Options setting
  • Choose Administrative tabe
  • Click on Change System Locale
  • Choose the desired locale, Arabic(Lebanon) in this case
  • It will prompt you to restart to reflect the change in effect, restart the system
How to determine the change if reflected, please follow below procedure,
  • Start->run
  • Type "regedit", and enter, it will take you to the Windows Registry
  • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\CodePage, Scroll down to the bottom
  • Below screenshot locates the same,


Step (2) : Change the NLS_LANG Parameter within the Windows Registry of ORACLE_HOME
Our next step is to take care of our Oracle environment respect to Operating System or what we need,
Please follow procedure below for the same to get it done,
  • Start->run
  • Type "regedit", and enter, it will take you to the Windows Registry
  • Then, HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_<oracle_home_name>
  • Change the NLS_LANG to the desired value, in this case, it is "AMERICAN_AMERICA.AR8MSWIN1256".
  • Below screenshot locates the same,

Step (3) : Change NLS_LANG in System's Environment Variables to the same value that has been set in the ORACLE_HOME registry
  • My Computer->Right Click->Properties
  • Choose advanced system settings
  • Click on Environment Variables
  • Click New on both User Variables and System Variables, and add NLS_LANG to the same value that has been set in both ORACLE_HOME registry and Windows Code Pages, im this case, it is "AMERICAN_AMERICA.AR8MSWIN1256"
  • Below screenshot locates the same,


Step (4) : Set the Character Set of the Database to the same character set that has been set as above during the Database Creation

Below screenshot locates the same,


Step (5) : Check on PL/SQL Developer or SQL Developer If Database is able take the Arabic, and Client PL/SQL Developer is able to read it and display in Arabic

Below screenshot shows the same,



I wish this helps those who seek to set correct NLS_LANG on Windows platform, Your feedback on the blog post is very much appreciated. Many Many Thanks!!

33 comments:

  1. Thanks for this blog. I have found some interesting blogs on google. You can check these blogs also which are related to technologies…..
    Avast Login
    garmin.com/express
    avg.com/retail
    bullguard login
    mcafee.com/activate

    ReplyDelete
  2. Bullguard Login is superb and smart antivirus utility which now connected online also.You can access all services of Bullguard antivirus by its login. So Bullguard Login is more beneficial for you because its basic step. Just login your account and access all data immediately related to your account.

    Bullguard Login
    Office Login
    Mcafee Login
    AVG Login
    Norton Login
    webroot login
    webroot.com/safe
    Turbotax Login

    ReplyDelete
  3. Wow very nice post from you. I like this and its really sharable content and great as well as. Get know of me . Office Login Must go on this link for the support help regarding the Microsoft office.

    ReplyDelete
  4. bullguard login- PC security is the way toward anticipating and distinguishing unapproved utilization of your PC. Counteractive action estimates enable you to prevent unapproved clients from getting to any piece of your PC framework. Recognition causes you to decide if somebody endeavored to break into your framework, in the event that they were effective, and what they may have done. www.bullguard.com/is-mdl-install | www.bullguard.com is-install-mdl-install | bullguard login

    ReplyDelete
  5. The TomTom is the most feature-packed, best connected, and smartest navigation device on the market, packing a number of features which help it compete with your smartphone.
    tomtom.com/getstarted | tomtom get started | www.tomtom.com/getstarted | tomtom update

    ReplyDelete
  6. Thanks for a very interesting blog. What else may I get that kind of info written in such a perfect approach? I’ve a undertaking that I am simply now operating on, and I have been at the look out for such info. nagapoker

    ReplyDelete
  7. AVG antivirus is a prominent virus protection program among the world of software . As many hackers and data stealers are waiting for the user’s mistake, they can misuse of user’s identity and other data.
    www.avg.com/retail |
    avg.com/retail

    ReplyDelete
  8. This article is an appealing wealth of informative data that is interesting and well-written. I commend your hard work on this and thank you for this information. You’ve got what it takes to get attention. techno tech blog

    ReplyDelete
  9. i never know the use of adobe shadow until i saw this post. thank you for this! this is very helpful. Sioux Falls IT Services

    ReplyDelete
  10. Norton to enroll and access the Norton account. Norton is in the top list of antivirus which safeguards the data, devices, identity, and others. Even its the question of business security or home network security, Norton is available for all kinds of security www.norton.com/enroll |
    norton.com/enroll | install norton with product key

    ReplyDelete
  11. This is very interesting content! I have thoroughly enjoyed reading your points and have come to the conclusion that you are right about many of them. You are great. trading

    ReplyDelete
  12. This was really an interesting topic and I kinda agree with what you have mentioned here! buy real instagram likes with paypal

    ReplyDelete
  13. You there, this is really good post here. Thanks for taking the time to post such valuable information. Quality content is what always gets the visitors coming. Outlook based CRM

    ReplyDelete
  14. This particular papers fabulous, and My spouse and i enjoy each of the perform that you have placed into this. I’m sure that you will be making a really useful place. I has been additionally pleased. Good perform! فضای مجازی

    ReplyDelete
  15. This fundamentally reduces expenses while by and large improving the nature of administration. Online business shops need far less, however high-talented, representatives. Online business likewise allows investment funds in stock conveying costs.Alfresco Training

    ReplyDelete
  16. Welcome to the party of my life here you will learn everything about me. Mobile Lover

    ReplyDelete
  17. This is really very much informative and it has been written very well, the content will be of great help to many people.Netflix Party Not Working Invalid Session Id | I cancel my Netflix subscription?

    ReplyDelete
  18. The writer has all the skills and also all the facts and information have been added here after proper research over the topic.The Possible Reason For Netflix Party Not Working | troubleshoot some general Netflix errors

    ReplyDelete
  19. Excellent information on your blog, thank you for taking the time to share with us. Amazing insight you have on this, it's nice to find a website that details so much information about different artists. content://com.android.browser.home/index

    ReplyDelete
  20. After reading this blog, I am really amazed as a single piece of information is written after good research on the topic and hence I must recommend reading this

    post.Netflix Customer Care Service Helpline

    ReplyDelete
  21. Positive site, where did u come up with the information on this posting? I'm pleased I discovered it though, ill be checking back soon to find out
    what additional posts you include.content://com.android.browser.home/index

    ReplyDelete
  22. I read a article under the same title some time ago, but this articles quality is much, much better. How you do this.. Ramen deuren

    ReplyDelete
  23. Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I'll be subscribing to your feed and I hope you post again soon. Big thanks for the useful info. Ramen en deuren Leuven

    ReplyDelete
  24. Positive site, where did u come up with the information on this posting?I have read a few of the articles on your website now, and I really like your style. Thanks a million and please keep up the effective work. windows and doors

    ReplyDelete
  25. I really appreciate this wonderful post that you have provided for us. I assure this would be beneficial
    for most of the people.https://1asiaqq.net

    ReplyDelete
  26. AsiaQQ adalah Situs Judi Online, BandarQQ, DominoQQ, PokerQQ, QQ Online, Situs QQ, Poker Online, Agen BandarQ
    Online 24 jam...https://1asiaqq.net/

    ReplyDelete
  27. Any individual who has purchased a TV, game reassure, or media player inside the most recent couple of years has known about HDMI, however numerous individuals are hazy on precisely what it is. While the name "HDMI", which is short for High Definition Multimedia Interface, most likely makes it sound excessively muddled, it's actually quite straightforward when you get directly down to it.PS5 HDMI Port

    ReplyDelete
  28. This unique looks utterly perfect. Every one of plain and simple records are prepared through the help of great number for working experience handy experience. I will be happy it all for a second time considerably. latest news

    ReplyDelete
  29. The design of the website is really done by an intelligent brain, and also all the content and the information that has been provided here is very nice. How to use AVG Boot-Time Scan?

    ReplyDelete
  30. I recently found many useful information in your website especially this blog page. Among the lots of comments on your articles. Thanks for sharing. https://itprospt.com/windows-10-headphones-not-showing-up-in-playback-devices

    ReplyDelete
  31. Within this webpage, you'll see the page, you need to understand this data. email extractor tool

    ReplyDelete

replica sets, Replication with mongoDB

Before we get into details of mongoDB replica sets, let's understand what is replication and why is it needed? Replication is a config...