Re: [cx-oracle-users] Accented character coming as "?" in select query output
Brought to you by:
atuining
From: johnny j. <joh...@gm...> - 2012-08-10 14:06:07
|
Hi Anthony, Let me try with the global profile setting. Great Thanks, Johnny On Thu, Aug 9, 2012 at 9:16 PM, Anthony Tuininga <ant...@gm... > wrote: > Hi Johnny, > > Unfortunately no assumptions can be made about the best encoding and > that needs to be set up by whoever is using the Oracle client. > Fortunately you can set the environment variable in your profile or > the global profile and never have to worry about it again. Glad you > got things figured out. > > Anthony > > On Thu, Aug 9, 2012 at 3:26 PM, johnny jebaraj > <joh...@gm...> wrote: > > Hi Anthony, > > > > After setting the encoding from the code, it started returning characters > > correctly. > > > > Line to add before making oracle connection from python code: > > > > os.environ["NLS_LANG"] = ".UTF8" > > > > Is there a way to set this as default for cx_Oracle module rather than > > setting it in the code? > > > > Great Thanks, > > > > Johnny > > > > > > > > > > On Thu, Aug 9, 2012 at 3:56 PM, Anthony Tuininga > > <ant...@gm...> wrote: > >> > >> Hi Johnny, > >> > >> You need to make sure you are setting your NLS_LANG environment > >> variable correctly. If it is set to a character set that does not > >> support the characters you are trying to retrieve you will get > >> question marks. You can try querying through SQL*Plus first and > >> getting things working there. Once they are working there you should > >> be fine with cx_Oracle as well. There are other options available but > >> they are far more complicated and you need a good understanding of > >> character sets, encodings and the like. I would try setting NLS_LANG > >> first. :-) > >> > >> Anthony > >> > >> On Thu, Aug 9, 2012 at 12:23 PM, johnny jebaraj > >> <joh...@gm...> wrote: > >> > Hi All, > >> > > >> > I am new to Oracle as well as to cx_Oracle forum. > >> > > >> > Recently I installed cx_Oracle module in my Red Hat linux machine and > >> > tried > >> > to do some DB fetch[select] from oracle. > >> > > >> > Looks like the accented character from my Oracle table is being > >> > retrieved as > >> > ? symbol (or) replaced to another character, not sure what was the > >> > problem. > >> > > >> > Example: > >> > > >> > In DB --> output from python program > >> > > >> > Caché --> Cache > >> > Permian–Triassic --> Permian?Triassic > >> > > >> > Did anyone faced this problem while using this module? > >> > > >> > I am using cx_Oracle-5.1.2 and Oracle 11g Database. > >> > > >> > Any help to solve this problem is very much appreciated. > >> > > >> > Thanks, > >> > > >> > Johnny > >> > > >> > > >> > > ------------------------------------------------------------------------------ > >> > Live Security Virtual Conference > >> > Exclusive live event will cover all the ways today's security and > >> > threat landscape has changed and how IT managers can respond. > >> > Discussions > >> > will include endpoint security, mobile security and the latest in > >> > malware > >> > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > >> > _______________________________________________ > >> > cx-oracle-users mailing list > >> > cx-...@li... > >> > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > >> > > >> > >> > >> > ------------------------------------------------------------------------------ > >> Live Security Virtual Conference > >> Exclusive live event will cover all the ways today's security and > >> threat landscape has changed and how IT managers can respond. > Discussions > >> will include endpoint security, mobile security and the latest in > malware > >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > >> _______________________________________________ > >> cx-oracle-users mailing list > >> cx-...@li... > >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > > > > > > > ------------------------------------------------------------------------------ > > Live Security Virtual Conference > > Exclusive live event will cover all the ways today's security and > > threat landscape has changed and how IT managers can respond. Discussions > > will include endpoint security, mobile security and the latest in malware > > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > > _______________________________________________ > > cx-oracle-users mailing list > > cx-...@li... > > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |