{"id":4381,"date":"2015-02-21T18:24:45","date_gmt":"2015-02-21T17:24:45","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/how-to-set-nls-for-sql-developer\/"},"modified":"2015-02-21T18:24:45","modified_gmt":"2015-02-21T17:24:45","slug":"how-to-set-nls-for-sql-developer","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/how-to-set-nls-for-sql-developer\/","title":{"rendered":"How to set NLS for SQL Developer"},"content":{"rendered":"<h2>By Franck Pachot<\/h2>\n<p>.<br \/>\nI&#8217;m using <a href=\"http:\/\/www.oracle.com\/technetwork\/developer-tools\/sql-developer\/downloads\/sqldev-41ea-2372780.html\">Oracle SQL Developer 4.1 Early Adopter<\/a> for a while and I like it. That version comes with a command line (in beta) which goal is to be fully compatible with sqlplus but running in java, and having a lot more features.<\/p>\n<p>Becuse it&#8217;s connecting with thin java driver by default, it doesn&#8217;t use NLS_LANG. It&#8217;s java. It&#8217;s unicode. So here is how to set the language and characterset with the java options.<\/p>\n<h3>-Duser.language<\/h3>\n<p>By default java uses the language that is set by your operating system locale. You can change it with the user.language option. For SQL Developer you put it on the command line as &#8216;-Duser.language=en&#8217; and for the command line you can set it in the DEBUG environment variable (this is for the alpha version &#8211; may change in the future).<\/p>\n<p>Here is an example:<\/p>\n<p><a class=\"easyblog-thumb-preview\" title=\"CaptureSQLCL1.JPG\" href=\"http:\/\/dbi-services.com\/blog\/images\/easyblog_images\/139\/CaptureSQLCL1.JPG\"><img decoding=\"async\" title=\"b2ap3_thumbnail_CaptureSQLCL1.JPG\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/b2ap3_thumbnail_CaptureSQLCL1.jpg\" alt=\"b2ap3_thumbnail_CaptureSQLCL1.JPG\" \/><\/a><\/p>\n<p>I had the date in French and because it&#8217;s unicode it displays bad characters on my DOS window. I changed it to English.<br \/>\nYou probably already know that. When you have a non-english locale and want to have SQL Developer in inglish, you just run:<\/p>\n<pre><code>sqldeveloper.exe -Duser.language=en<\/code><\/pre>\n<h3>-Dfile.encoding<\/h3>\n<p>What if I want to keep my local and display the special characters correctly?<br \/>\nMy DOS window is in PC850 characterset (I&#8217;ve blogged about that <a href=\"\/nlslang-on-windows-in-europe-we8mswin1252-or-we8pc850\">recently<\/a>). Here is how to set the characterset in Java:<\/p>\n<p><a class=\"easyblog-thumb-preview\" title=\"CaptureSQLCL2.JPG\" href=\"http:\/\/dbi-services.com\/blog\/images\/easyblog_images\/139\/CaptureSQLCL2.JPG\"><img decoding=\"async\" title=\"b2ap3_thumbnail_CaptureSQLCL2.JPG\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/b2ap3_thumbnail_CaptureSQLCL2.jpg\" alt=\"b2ap3_thumbnail_CaptureSQLCL2.JPG\" \/><\/a><\/p>\n<p>So, when you will port your sqlplus scripts to the new SQL Developer command line, don&#8217;t forget to check the NLS_LANG you were using and set the right Java environement.<\/p>\n<h3>And the territory<\/h3>\n<p>NLS_LANG sets characterse, language and territory. Currently I don&#8217;t think we can set the territory from the command line environment. But login.sql is still used as in sqlplus, so we can put all ALTER SESSION SET NLS_&#8230; in it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>By Franck Pachot . I&#8217;m using Oracle SQL Developer 4.1 Early Adopter for a while and I like it. That version comes with a command line (in beta) which goal is to be fully compatible with sqlplus but running in java, and having a lot more features. Becuse it&#8217;s connecting with thin java driver by [&hellip;]<\/p>\n","protected":false},"author":27,"featured_media":4382,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[198,59],"tags":[214,96],"type_dbi":[],"class_list":["post-4381","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-database-management","category-oracle","tag-java","tag-oracle"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to set NLS for SQL Developer - dbi Blog<\/title>\n<meta name=\"description\" content=\"Changing SQL Developer language\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/how-to-set-nls-for-sql-developer\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to set NLS for SQL Developer\" \/>\n<meta property=\"og:description\" content=\"Changing SQL Developer language\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/how-to-set-nls-for-sql-developer\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2015-02-21T17:24:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/b2ap3_thumbnail_CaptureSQLCL1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"500\" \/>\n\t<meta property=\"og:image:height\" content=\"224\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Oracle Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Oracle Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/how-to-set-nls-for-sql-developer\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/how-to-set-nls-for-sql-developer\/\"},\"author\":{\"name\":\"Oracle Team\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\"},\"headline\":\"How to set NLS for SQL Developer\",\"datePublished\":\"2015-02-21T17:24:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/how-to-set-nls-for-sql-developer\/\"},\"wordCount\":319,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/how-to-set-nls-for-sql-developer\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/b2ap3_thumbnail_CaptureSQLCL1.jpg\",\"keywords\":[\"Java\",\"Oracle\"],\"articleSection\":[\"Database management\",\"Oracle\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/how-to-set-nls-for-sql-developer\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/how-to-set-nls-for-sql-developer\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/how-to-set-nls-for-sql-developer\/\",\"name\":\"How to set NLS for SQL Developer - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/how-to-set-nls-for-sql-developer\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/how-to-set-nls-for-sql-developer\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/b2ap3_thumbnail_CaptureSQLCL1.jpg\",\"datePublished\":\"2015-02-21T17:24:45+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\"},\"description\":\"Changing SQL Developer language\",\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/how-to-set-nls-for-sql-developer\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/how-to-set-nls-for-sql-developer\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/how-to-set-nls-for-sql-developer\/#primaryimage\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/b2ap3_thumbnail_CaptureSQLCL1.jpg\",\"contentUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/b2ap3_thumbnail_CaptureSQLCL1.jpg\",\"width\":500,\"height\":224},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/how-to-set-nls-for-sql-developer\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to set NLS for SQL Developer\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\",\"name\":\"Oracle Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"caption\":\"Oracle Team\"},\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/oracle-team\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to set NLS for SQL Developer - dbi Blog","description":"Changing SQL Developer language","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/how-to-set-nls-for-sql-developer\/","og_locale":"en_US","og_type":"article","og_title":"How to set NLS for SQL Developer","og_description":"Changing SQL Developer language","og_url":"https:\/\/www.dbi-services.com\/blog\/how-to-set-nls-for-sql-developer\/","og_site_name":"dbi Blog","article_published_time":"2015-02-21T17:24:45+00:00","og_image":[{"width":500,"height":224,"url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/b2ap3_thumbnail_CaptureSQLCL1.jpg","type":"image\/jpeg"}],"author":"Oracle Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Oracle Team","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/how-to-set-nls-for-sql-developer\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/how-to-set-nls-for-sql-developer\/"},"author":{"name":"Oracle Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"headline":"How to set NLS for SQL Developer","datePublished":"2015-02-21T17:24:45+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/how-to-set-nls-for-sql-developer\/"},"wordCount":319,"commentCount":0,"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/how-to-set-nls-for-sql-developer\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/b2ap3_thumbnail_CaptureSQLCL1.jpg","keywords":["Java","Oracle"],"articleSection":["Database management","Oracle"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/how-to-set-nls-for-sql-developer\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/how-to-set-nls-for-sql-developer\/","url":"https:\/\/www.dbi-services.com\/blog\/how-to-set-nls-for-sql-developer\/","name":"How to set NLS for SQL Developer - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/how-to-set-nls-for-sql-developer\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/how-to-set-nls-for-sql-developer\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/b2ap3_thumbnail_CaptureSQLCL1.jpg","datePublished":"2015-02-21T17:24:45+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"description":"Changing SQL Developer language","breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/how-to-set-nls-for-sql-developer\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/how-to-set-nls-for-sql-developer\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/how-to-set-nls-for-sql-developer\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/b2ap3_thumbnail_CaptureSQLCL1.jpg","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/b2ap3_thumbnail_CaptureSQLCL1.jpg","width":500,"height":224},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/how-to-set-nls-for-sql-developer\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to set NLS for SQL Developer"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee","name":"Oracle Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","caption":"Oracle Team"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/oracle-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/4381","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/27"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=4381"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/4381\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media\/4382"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=4381"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=4381"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=4381"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=4381"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}