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!!

68 comments:

  1. 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
  2. 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
  3. 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
  4. 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
  5. 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
  6. This was really an interesting topic and I kinda agree with what you have mentioned here! buy real instagram likes with paypal

    ReplyDelete
  7. 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
  8. 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
  9. 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
  10. Welcome to the party of my life here you will learn everything about me. Mobile Lover

    ReplyDelete
  11. 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
  12. 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
  13. 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
  14. 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
  15. 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
  16. 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
  17. AsiaQQ adalah Situs Judi Online, BandarQQ, DominoQQ, PokerQQ, QQ Online, Situs QQ, Poker Online, Agen BandarQ
    Online 24 jam...https://1asiaqq.net/

    ReplyDelete
  18. 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
  19. 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
  20. 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
  21. Within this webpage, you'll see the page, you need to understand this data. email extractor tool

    ReplyDelete
  22. This comment has been removed by the author.

    ReplyDelete
  23. Another understudy nonetheless, communicated how she lean towards less difficult technology that her instructor is alright with instead of cutting edge that the educator doesn't control well "The main thing for instructors is to be OK with what they're utilizing.Access Control System

    ReplyDelete
  24. Very interesting information, worth recommending. However, I recommend this: https://oomnex.com/esthetic-spa-equipment-catalog

    ReplyDelete
  25. Profit primarily prime quality items -- you can understand them all within: PRIME

    ReplyDelete
  26. By running such a program and appending an objective drive to the speculate PC, the analyst will make changes or potentially augmentations to the condition of the PC which were absent before his activities.Best Minecraft Servers

    ReplyDelete
  27. Great job for publishing such a beneficial web site. Your web log isn’t only useful but it is additionally really creative too. There tend to be not many people who can certainly write not so simple posts that artistically. Continue the nice writing what is an aae file, what are aae files

    ReplyDelete
  28. Hello I am so delighted I located your blog, I really located you by mistake, while I was watching on google for something else, Anyways I am here now and could just like to say thank for a tremendous post and a all round entertaining website. Please do keep up the great work. körkort online

    ReplyDelete
  29. I haven’t any word to appreciate this post.....Really i am impressed from this post....the person who create this post it was a great human..thanks for shared this with us. more info

    ReplyDelete
  30. "mcafee is an antivirus software providers that secure your computer for virus , worms ,trojens and other mailcious program .it provides full range of
    security product like antivirus , firewall etc .you have to do mcafee antivirus download "

    ReplyDelete
  31. I really impressed after read this because of some quality work and informative thoughts . I just wanna say thanks for the writer and wish you all the best for coming!. https://birthdaypartyplanner.co.in/

    ReplyDelete
  32. Awesome blog. I enjoyed reading your articles. This is truly a great read for me. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work! vegabréfsáritun Kanada

    ReplyDelete
  33. thank you for your interesting infomation. new zealand visa

    ReplyDelete
  34. Since a home based business doesn't offer contact data or energizes front doesn't really mean they are deceptive, yet the dishonest ones most certainly don't offer any data and consistently energize front.the lofts at hollywood station

    ReplyDelete
  35. wow, great, I was wondering how to cure acne naturally. and found your site by google, learned a lot, now i’m a bit clear. I’ve bookmark your site and also add rss. keep us updated. Ramen en deuren Limburg

    ReplyDelete
  36. I was surfing the Internet for information and came across your blog. I am impressed by the information you have on this blog. It shows how well you understand this subject. catchy business names

    ReplyDelete
  37. My Own Smurf provides smurf accounts of various games like csgo, valorant and GTA at an affordable price

    ReplyDelete
  38. I recently came across your blog and have been reading along. I thought I would leave my first comment. I don’t know what to say except that I have enjoyed reading. unique business names

    ReplyDelete
  39. I am glad you take pride in what you write. This makes you stand way out from many other writers that push poorly written content. short business names

    ReplyDelete
  40. Someone Sometimes with visits your blog regularly and recommended it in my experience to read as well. The way of writing is excellent and also the content is top-notch. Thanks for that insight you provide the readers! company name ideas

    ReplyDelete
  41. You are awesome for sharing all that knowledge on BSc 2nd Year Result. I really appreciate visiting your website again. Thank you for your generosity!

    ReplyDelete
  42. I find your thoughts on this article are awesome. Thanks for sharing this with us. Keep reading more useful information here- Jockey Rossa Ryan

    ReplyDelete
  43. The paint and primer floor remedy course of out there in} almost any shade conceivable. Therefore, it creates an aesthetically pleasing floor finish, in contrast to|not like} different steel ending merchandise. There are multiple of} ways in which a milling machine can minimize a block of fabric, however the two most distinct are standard and climbing. Conventional milling is when the device cuts in reverse direction|the different way|the incorrect CNC machining way} of the block. Cutting in reverse direction|the different way|the incorrect way} causes the friction that quickly shaves down the block. Climb milling entails the device rotating with the path of the block’s feed, thinly chopping the block in less put on and tear than the conventional method.

    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...